Re: Strange behavior
>I have the following Problem:
>swe@LinuxPPC:~$ sudo mkdir /sda1
>swe@LinuxPPC:~$ sudo chown swe /sda1
>swe@LinuxPPC:~$ ls -la /sda1
>total 8
>drwxr-xr-x 2 swe root 4096 Jan 11 16:19 .
>drwxr-xr-x 37 root root 4096 Jan 11 16:19 ..
As shown, /sda1 only has write permission for the owner of the
file(directory in this case).
>swe@LinuxPPC:~$ mount /dev/sda1 /sda1
>mount: only root can do that
>swe@LinuxPPC:~$ sudo mount /dev/sda1 /sda1
>swe@LinuxPPC:~$ ls -la /sda1
>total 4908
>drwxr-xr-x 14 root root 16384 Jan 1 1970 .
>drwxr-xr-x 37 root root 4096 Jan 11 16:19 ..
>-rwxr-xr-x 1 root root 6148 Jan 10 13:56 .DS_Store
>drwxr-xr-x 2 root root 2048 Nov 23 12:27 .Trash-swe
>.
>.
>.
>-rwxr-xr-x 1 root root 180 Jan 11 15:59 hints
>.
>.
>.
>swe@LinuxPPC:~$ sudo mount /dev/sda1 /sda1
>swe@LinuxPPC:~$ sudo chown -R swe /sda1
>chown: changing ownership of `/sda1': Operation not permitted
>chown: changing ownership of `/sda1/.Trashes': Operation not permitted
>chown: changing ownership of `/sda1/macintosh.pdf': Operation not
permitted
>.
>.
>.
>chown: changing ownership of `/sda1/hints': Operation not permitted
>.
>.
>.
>swe@LinuxPPC:~$ cat >>/sda1/hints
>bash: /sda1/hints: Permission denied
>swe@LinuxPPC:~$ sudo cat >>/sda1/hints
>bash: /sda1/hints: Permission denied
>swe@LinuxPPC:~$ su -
>Password:
>LinuxPPC:~# cat >>/sda1/hints
>The user swe has the same group as root (0).
>What's going on here?
>Fritz
I suspect `touch hello in /sda1 will also FAIL. What I can suggest is:
$ chmod g+swx /sda1
then, as swe user,
$ touch /sda1/hello
should succeed...?
Regards,
TEH
Reply to: