Check write permissions in parent directory for file delete

jennifer averett jennifer.averett at oarcorp.com
Mon Nov 10 19:43:00 UTC 2003


Would you please submit a PR against the filesystem about this.

Thanks
Jennifer 

Sergey Ablalimov wrote:
> 
> Hello.
> 
> I am using IMFS as a base file system. And I do following operations:
> ---------------------------------------------------------------
> RTEMS SHELL (Ver.1.0-FRC):/dev/console. Nov  9 2003. 'help' to list commands.
> shel [/etc] $ whoami
> ant
> shel [/] $ ls
> drwxr-xr-x   1   root   root        5092 Jan 01 00:00 dev/
> drwxrwxrwx   1   root   root        3484 Nov 02 22:28 disc/
> drwxr-xr-x   1   root   root        1340 Nov 02 22:28 etc/
> 3 files 9916 bytes occupied
> shel [/] $ cd etc
> shel [/etc] $ ls
> -rw-r--r--   1   root   root          90 Nov 02 22:28 passwd
> -rw-r--r--   1   root   root         117 Nov 02 22:28 shadow
> -rw-r--r--   1   root   root          42 Nov 02 22:28 group
> -rw-r--r--   1   root   root          34 Nov 02 22:28 issue
> -rw-r--r--   1   root   root          28 Nov 02 22:28 issue.net
> 5 files 311 bytes occupied
> shel [/etc] $ rm issue
> shel [/etc] $ ls
> -rw-r--r--   1   root   root          90 Nov 02 22:28 passwd
> -rw-r--r--   1   root   root         117 Nov 02 22:28 shadow
> -rw-r--r--   1   root   root          42 Nov 02 22:29 group
> -rw-r--r--   1   root   root          28 Nov 02 22:28 issue.net
> 4 files 277 bytes occupied
> shel [/etc] $
> --------------------------------------------------------------------
> I'm not root. I don't have permissions for write in /etc directory, but
> I can delete files from /etc.
> I see in file "cpukit/libcsupport/src/unlink.c". There are no support
> for check write permissions in parent directory.
> Is this RTEMS error?
> 
> --
>  Sergey                          mailto:sa at design.morion.ru
> 
> ---------------------------------------
> Outgoing mail is certified Virus Free.
> Checked by DKAV anti-virus system (http://www.avp.com).
> Version: 3.5.9.0



More information about the users mailing list