As root I cannot change ownership of a directory that root owns. This is the directory: linux:/home/myhome # cat /etc/fstab | grep hda4 /dev/hda4 /home/myhome/Windows vfat defaults 0 0 This is what happens: linux:/home/myhome # chown -v myuser /home/myhome/Windows chown: changing ownership of `/home/myhome/Windows': Operation not permitted failed to change ownership of `/home/myhome/Windows' to myuser Why is this operation not permitted?? Before I got to this point I tried to use mount to mount this file system but mount said the filesystem (hda4) didn't exist. Yet Yast was able to mount it but, I can't change the owner. Maybe mount not finding hda4 is related to not being able to change owner. How can I fix this? Thanks, Jerome
On Saturday 04 February 2006 15:01, Susemail wrote:
How can I fix this? Thanks, Jerome
You can't. The FAT32 filesystem doesn't support permissions and ownership. Those concepts are foreign to the structure. There's no place to store and manage it. You can mount it and read/write with it, but you won't be able to change ownership. - Carl
Carl, SM, On Saturday 04 February 2006 12:24, Carl Hartung wrote:
On Saturday 04 February 2006 15:01, Susemail wrote:
How can I fix this? Thanks, Jerome
You can't.
The FAT32 filesystem doesn't support permissions and ownership. Those concepts are foreign to the structure. There's no place to store and manage it. You can mount it and read/write with it, but you won't be able to change ownership.
All true, but there is one option available that may help the OP. FAT partitions can be mounted with user and group ID options that make all the files and directories on that file system apear to bear the specified user and group IDs. To do this, include the uid=UUU and gid=GGG options in the mount table or on the mount command line. UUU and GGG are numeric user and group IDs, resp.
- Carl
Randall Schulz
On Saturday 04 February 2006 16:57, Randall R Schulz wrote:
All true, but there is one option available that may help the OP. FAT partitions can be mounted with user and group ID options that make all the files and directories on that file system apear to bear the specified user and group IDs.
To do this, include the uid=UUU and gid=GGG options in the mount table or on the mount command line. UUU and GGG are numeric user and group IDs, resp.
I've known, in theory, that this can be done but haven't had the need to try it. Since we're on this topic, maybe we can cover a couple of related points, too? On my system: l from / for /windows: drwxr-xr-x 6 root root 240 2005-11-13 10:08 windows/ under /windows, I have three FAT32 partitions, all mounted the same way. Here is my /etc/fstab entry for Windows "C:" /dev/hda2 on /windows/C type vfat (rw,noexec,nosuid,nodev,gid=100,umask=0002,utf8=true) (note utf8=true) and l: lrwxrwxrwx 1 root root 1 2005-11-13 10:08 c -> C/ drwxrwxr-x 12 root users 4096 1969-12-31 19:00 C/ I can read/write as both user and root. How would the OP modify his entry, exactly? Why is the date shown as "1969-12-31"? Is having utf8 set "true" a problem? TIA & regards, - Carl
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2006-02-04 at 17:31 -0500, Carl Hartung wrote:
lrwxrwxrwx 1 root root 1 2005-11-13 10:08 c -> C/ drwxrwxr-x 12 root users 4096 1969-12-31 19:00 C/
I can read/write as both user and root. How would the OP modify his entry, exactly?
How do you want the permissions to be? - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFD5TqctTMYHG2NR9URAoJUAJsFP6xOY7AOcEDhvbtQsJuZRlrzrACghCUO 6dUz8vnquXj5VUspyAiq2oA= =nXV/ -----END PGP SIGNATURE-----
On Saturday 04 February 2006 18:36, Carlos E. R. wrote:
How do you want the permissions to be?
It isn't *me* but the OP. From his fstab:
/dev/hda4 /home/myhome/Windows vfat defaults 0 0 and: inux:/home/myhome # chown -v myuser /home/myhome/Windows
The chown fails "operation not permitted" I think he wanted to own the partition as user. - Carl
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2006-02-04 at 19:15 -0500, Carl Hartung wrote:
On Saturday 04 February 2006 18:36, Carlos E. R. wrote:
How do you want the permissions to be?
It isn't *me* but the OP.
I know, but I thought you knew how he wanted them to be. I don't, not clearly :-p
I think he wanted to own the partition as user.
Then simply mount it as "myuser", not root; ie, issue the mount command being "myuser" at the time. That's one way. Another would be to use "uid=myuser" in the fstab entry (no need to use numeric ids). - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFD5ee1tTMYHG2NR9URAgvHAJ9IReBqnJvrT3UO93cUNRCEf4gY/QCaA8G1 5hZGpT9lGfKhUQIHarAX1+4= =D63P -----END PGP SIGNATURE-----
On Sunday 05 February 2006 06:55, Carlos E. R. wrote:
Then simply mount it as "myuser", not root; ie, issue the mount command being "myuser" at the time. That's one way. Another would be to use "uid=myuser" in the fstab entry (no need to use numeric ids).
Thanks for sharing that, Carlos. It was in line with my thinking... I've just never had the need to try it. regards, - Carl
participants (4)
-
Carl Hartung
-
Carlos E. R.
-
Randall R Schulz
-
Susemail