Re: Permission Questions

2021-08-31 Thread Rainer Dorsch
Am Dienstag, 31. August 2021, 00:00:02 CEST schrieb Greg Wooledge: > On Mon, Aug 30, 2021 at 09:29:14PM +, Andy Smith wrote: > > Hello, > > > > On Mon, Aug 30, 2021 at 05:07:16PM -0400, Greg Wooledge wrote: > > > unicorn:~$ strace bash -c 'echo stuff >> /tmp/123' > > > [...] > > > openat(AT_FD

Re: Permission Questions

2021-08-30 Thread Rainer Dorsch
Am Montag, 30. August 2021, 21:58:47 CEST schrieb Greg Wooledge: > On Mon, Aug 30, 2021 at 09:01:33PM +0200, Rainer Dorsch wrote: > > rd@h370:~/tmp.nobackup$ ls -l /tmp/123 > > -rw-rw-r-- 1 rd users 0 30. Aug 20:42 /tmp/123 > > > > User ka overwrites it with the content of another file (atomically

Permission Questions

2021-08-30 Thread Rainer Dorsch
Hi, I am looking for advice how to implement best this kind of usecase: User rd creates a file on /tmp: rd@h370:~/tmp.nobackup$ touch /tmp/123 rd@h370:~/tmp.nobackup$ chgrp users /tmp/123 rd@h370:~/tmp.nobackup$ chmod g+w /tmp/123 rd@h370:~/tmp.nobackup$ ls -l /tmp/123 -rw-rw-r-- 1 rd users 0 30

Re: Permission Questions

2021-08-30 Thread Greg Wooledge
On Mon, Aug 30, 2021 at 09:29:14PM +, Andy Smith wrote: > Hello, > > On Mon, Aug 30, 2021 at 05:07:16PM -0400, Greg Wooledge wrote: > > unicorn:~$ strace bash -c 'echo stuff >> /tmp/123' > > [...] > > openat(AT_FDCWD, "/tmp/123", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES > > (Permission de

Re: Permission Questions

2021-08-30 Thread Andy Smith
Hello, On Mon, Aug 30, 2021 at 05:07:16PM -0400, Greg Wooledge wrote: > unicorn:~$ strace bash -c 'echo stuff >> /tmp/123' > [...] > openat(AT_FDCWD, "/tmp/123", O_WRONLY|O_CREAT|O_APPEND, 0666) = -1 EACCES > (Permission denied) > > As far as I can see, this is a kernel bug. Unless I'm overlook

Re: Permission Questions

2021-08-30 Thread Greg Wooledge
On Mon, Aug 30, 2021 at 10:57:59PM +0200, Rainer Dorsch wrote: > Hmm...your example works for me as well > > rd@h370:~/tmp.nobackup$ sudo touch /tmp/123; sudo chgrp video /tmp/123; sudo > chmod 664 /tmp/123 > [sudo] Passwort für rd: > rd@h370:~/tmp.nobackup$ ls -l /tmp/123 > -rw-rw-r-- 1 root vi

Re: Permission Questions

2021-08-30 Thread Greg Wooledge
On Mon, Aug 30, 2021 at 09:01:33PM +0200, Rainer Dorsch wrote: > rd@h370:~/tmp.nobackup$ ls -l /tmp/123 > -rw-rw-r-- 1 rd users 0 30. Aug 20:42 /tmp/123 > User ka overwrites it with the content of another file (atomically): > > ka@h370:~$ echo test > 123 > ka@h370:~$ mv 123 /tmp/123 > mv: cannot

Re: Permission Questions

2021-08-30 Thread IL Ka
> > > Is there something special with /tmp? > Do you have sticky bit on `/tmp`? > For directories, when a directory's sticky bit is set, the filesystem treats the files in such directories in a special way so only the file's owner, the directory's owner, or root user can rename or delete the file