Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.lang.python > #3414

Re: sudo python PermissionError [Errno 13] Permission denied

X-Received by 2002:a37:7a85:: with SMTP id v127mr48925796qkc.373.1608208096676; Thu, 17 Dec 2020 04:28:16 -0800 (PST)
X-Received by 2002:a5b:812:: with SMTP id x18mr60996094ybp.334.1608208096354; Thu, 17 Dec 2020 04:28:16 -0800 (PST)
Path csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups fr.comp.lang.python
Date Thu, 17 Dec 2020 04:28:15 -0800 (PST)
In-Reply-To <rrfell$vde$2@pasdenom.info>
Complaints-To groups-abuse@google.com
Injection-Info google-groups.googlegroups.com; posting-host=185.24.186.214; posting-account=dcD-vwoAAAADRTmn7k3Lt-A6Fc1w3JmV
NNTP-Posting-Host 185.24.186.214
References <756e5489-40b6-4456-8593-19809e097c46n@googlegroups.com> <rrfell$vde$2@pasdenom.info>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <cb8f58c6-a33f-4e75-b97a-d024586c890fn@googlegroups.com> (permalink)
Subject Re: sudo python PermissionError [Errno 13] Permission denied
From "pata...@gmail.com" <patatetom@gmail.com>
Injection-Date Thu, 17 Dec 2020 12:28:16 +0000
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding quoted-printable
Lines 35
Xref csiph.com fr.comp.lang.python:3414

Show key headers only | View raw


Le jeudi 17 décembre 2020 à 12:16:06 UTC+1, yamo' a écrit :
> Salut, 
> x a tapoté le 17/12/2020 10:56:
> > pourquoi le super-utilisateur root ne peut-il pas manipuler le fichier avec Python ?
> Tu dois avoir une protection sur /tmp 
> 
> /usr/local/bin ou /var/tmp sont peut-être plus adaptés. 
> 
> -- 
> Stéphane

bingo Stéphane !

le "sticky bit" positionné sur /tmp/ empêche l'utilisateur root d'altérer le fichier appartenant au simple utilisateur user !

$ ls -ld /tmp/
drwxrwxrwt 13 root root 320 Dec 17 13:22 /tmp/

$ ls -l /tmp/test 
-rw-r--r-- 1 user user 0 Dec 17 13:24 /tmp/test

$ echo test | sudo tee -a /tmp/test 
tee: /tmp/test: Permission denied
test

mais il n'empêche pas sa suppression !

$ sudo rm -v /tmp/test
removed '/tmp/test'

ce qui m'a induit en erreur : désolé pour la perte de temps.

bonne fin d'année 2020, lacsaP.

Back to fr.comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

sudo python PermissionError [Errno 13] Permission denied "pata...@gmail.com" <patatetom@gmail.com> - 2020-12-17 01:56 -0800
  Re: sudo python PermissionError [Errno 13] Permission denied yamo' <yamo@beurdin.invalid> - 2020-12-17 12:16 +0100
    Re: sudo python PermissionError [Errno 13] Permission denied "pata...@gmail.com" <patatetom@gmail.com> - 2020-12-17 04:28 -0800
      Re: sudo python PermissionError [Errno 13] Permission denied Francois Lafont <francois.lafont@nospam.invalid> - 2020-12-17 23:29 +0100
        Re: sudo python PermissionError [Errno 13] Permission denied Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2020-12-18 13:32 +0100
          Re: sudo python PermissionError [Errno 13] Permission denied "pata...@gmail.com" <patatetom@gmail.com> - 2020-12-18 06:03 -0800
            Re: sudo python PermissionError [Errno 13] Permission denied "pata...@gmail.com" <patatetom@gmail.com> - 2020-12-18 06:20 -0800
              Re: sudo python PermissionError [Errno 13] Permission denied Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2020-12-18 18:38 +0100
                Re: sudo python PermissionError [Errno 13] Permission denied Francois Lafont <francois.lafont@nospam.invalid> - 2020-12-19 02:59 +0100
                Re: sudo python PermissionError [Errno 13] Permission denied "pata...@gmail.com" <patatetom@gmail.com> - 2020-12-23 03:12 -0800
            Re: sudo python PermissionError [Errno 13] Permission denied Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2020-12-21 08:01 +0100
              Re: sudo python PermissionError [Errno 13] Permission denied "pata...@gmail.com" <patatetom@gmail.com> - 2020-12-23 03:27 -0800
                Re: sudo python PermissionError [Errno 13] Permission denied Alain Ketterlin <alain@universite-de-strasbourg.fr.invalid> - 2020-12-26 18:47 +0100
                Re: sudo python PermissionError [Errno 13] Permission denied "pata...@gmail.com" <patatetom@gmail.com> - 2021-01-07 07:49 -0800

csiph-web