Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"why can't I change this file mode ?
Is it because it is a Fat32 directory ? "
If this directory is a mountpoint then you cannot change the file mode while a file system is mounted on the directory. If this is the case then umount the file system with:
umount /DataDos
Then do your chmod command and remount the file system on /DataDos.
"I can't see them when it is not mounted, and I still have the same message if I try chmod on any subdirectories under /DataDos."
The Fat32 file system does not have any fields available to keep track of permissions and ownership. So Linux fakes it by giving every file and directory in a Fat32 file system the same permissions and ownership as the mount point directory. You cannot change the permissions or ownership of just some directories or files in the Fat32 file system mounted on /DataDos.
it seems to works, but as soon as I mount the directory, my change is lost, and permissions come back to 755.
It seems that only root can write inside a Fat32 directory. I tried with another Fat32 hard drive, and this is the same thing : I can make chmod 757, but after having mounted the drive, it comes back to 755.
"it seems to works, but as soon as I mount the directory, my change is lost, and permissions come back to 755."
mount also looks for information in /etc/fstab. See if there is an entry in /etc/fstab for the Fat32 partition and if there is check the entry for a conflict with what you are trying to do.
The first device on wich i tried chmod (hdb1) has an entry in /etc/fstab.
But the second one (hda1) has not, so it can't be in conflict with something in fstab.
Both of them are fat32, and both lost my permissions changes as soon I mount them...
It seems to be a hard problem ? Is there a doc anywhere I should read ?
Originally posted by Kanaflloric The first device on wich i tried chmod (hdb1) has an entry in /etc/fstab.
But the second one (hda1) has not, so it can't be in conflict with something in fstab.
Both of them are fat32, and both lost my permissions changes as soon I mount them...
It seems to be a hard problem ? Is there a doc anywhere I should read ?
Quote:
The Fat32 file system does not have any fields available to keep track of permissions and ownership. So Linux fakes it by giving every file and directory in a Fat32 file system the same permissions and ownership as the mount point directory. You cannot change the permissions or ownership of just some directories or files in the Fat32 file system mounted on /DataDos.
Look at the line that describes your hdb1 in your fstab. I'll bet it has an "ro" specified somewhere, which means "readonly". Change it to "rw" -- read/write -- and see if it helps.
Beware that all the files in your fat32 partition will share the same permission setting.
Your fstab should read somthing like:
/dev/hda1 /DataDos vfat auto,rw 0 0
Which will enable you to have write permissions to you /DataDos partition.
You cannot set directories under this partion with different permissions they are either
ro = read only or rw = read/write
I understood that all fat32 files and subdirectories can't be changed, and share the same permissions as the mounting point. What I didn't know, is that you do not apply new permissions on the mountpoint by using chmod !
This have to be made by using the mount command with two options :
For those who'll read this thread with a similary problem, here is an example :
# mount /dev/hda1 /mnt/Fat32HD/ -t vfat -o rw,umask=020
umask is really important, because it is the permissions mask. Without it, you stay read only, wich is what happend to me.
Thank you for your help.
Last edited by Kanaflloric; 08-14-2004 at 04:19 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.