newbie's question on file permission

Florian Diesch diesch at spamfence.net
Fri Aug 1 19:22:18 UTC 2008


"Zhengguo Xu" <tworiversfolk at gmail.com> wrote:

> Recently I encounted a strange problem (or it maybe very obvious for you
> guys) while copying files and I'd like to ask a question on file permission
> in linux.
>
> I have a file, lets say 'biology.ppt' and it has permission as follows and i
> am the owner and it belongs to group 'root'
>
> -rwx------
>
> i want to change it to group, say, 'test', and give permissions to everyone
> to read and write and execute, what's wrong when I run the following
> command?
>
> sudo chgrp test biology.ppt
> sudo chmod 777 biology.ppt
>
> nothing happened when i run these commands and i tried them with and without
> sudo. the file still has the permission -rwx------ and root is still the
> group.
>
> if it matters, the file is on a usb disk mounted in /media

That matters. most likely it is on a file system, that doesn't
support unix file permissions (like FAT). Then file permissions are
emulated and set at mount time using mount options like  uid, gid,... 
(see man mount for more about this). AFAIK there'no simple way to
change the permissions for automounted file systems, but you may
unmount and mount the filesystem manually.



   Florian
-- 
<http://www.florian-diesch.de/>
-----------------------------------------------------------------------
**  Hi! I'm a signature virus! Copy me into your signature, please!  **
-----------------------------------------------------------------------




More information about the ubuntu-users mailing list