Re: sudo python PermissionError [Errno 13] Permission denied

2020-12-17 Thread Pascal
you are right ! the "sticky bit" set to /tmp/ prevents the root user from altering the file belonging to the simple user ! $ ls -ld /tmp/ drwxrwxrwt 13 root root 320 Dec 17 13:22 /tmp/ $ ls -l /tmp/test -rw-r--r-- 1 user 0 Dec 17 13:24 /tmp/test $ echo test | sudo tee -a /tmp/test tee: /tmp/tes

Re: sudo python PermissionError [Errno 13] Permission denied

2020-12-17 Thread 2QdxY4RzWzUUiLuE
On 2020-12-17 at 11:17:37 +0100, Pascal wrote: > hi, > > here, I have this simple script that tests if the /tmp/test file can be > opened in write mode : > > $ cat /tmp/append > #!/usr/bin/python > with open('/tmp/test', 'a'): pass > > the file does not exist yet : > > $ chmod +x /tmp/append

sudo python PermissionError [Errno 13] Permission denied

2020-12-17 Thread Pascal
hi, here, I have this simple script that tests if the /tmp/test file can be opened in write mode : $ cat /tmp/append #!/usr/bin/python with open('/tmp/test', 'a'): pass the file does not exist yet : $ chmod +x /tmp/append $ ls -l /tmp/test ls: cannot access '/tmp/test': No such file or director