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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I spent a hour trying to save a file from the web. I kept getting permission errors. So I opened a console window as root. I tried to change permissions with 'chmod' to a+rwx' ; no warning or error messages and the write (w) permission to group(g) and all(a) were not affected. The user and group were 'root', so I decided to change that too. Again no success.
Then it occurred to me that the entire partion might be write protected. so I looked at my
The FAT filesystem cannot support *nix-style permissions, so no amount of chmodding or chowning will ever do you any good on a FAT partition. The permissions must be simulated at mount time, and can be changed with the umask, uid, and gid mount options.
When you use "defaults", the permissions and ownership are set for root, which is why it works when you are logged in as root. So instead of using "defaults", set uid=username, gid=groupname, and umask to equal the inverse of the permissions you want (e.g. umask=000 gives the drive full 777 permissions).
Last edited by David the H.; 07-24-2008 at 08:37 AM.
I've read a few similar posts, I just have 2 more questions.
(1) why can't I change some permissions and not others on vfat?
(2) please tell me how to modify my fstab file?
You can't use the 'chmod' command on a mounted vfat partition. You need to use the umask= option instead. As an alternative, you can use the fmask= and dmask= options to give different permissions for files and directories. You probably don't want files on this drive to be executable, so you could mask out the 'x' execution bit using fmask. However, the 'x' bit serves a different function for directories, so you would want it set.
Read through the 'man mount' man-page for all of the gory details!
There are other options you can use. For example, instead of the users option you can use 'uid=' and 'gid=' option. So if your username is 'guy24x' you could have 'uid=guy24x' as one of the options. This will make you the owner of the partition, and give you full access. If there is a 'guy24x' group also, you could use 'gid=guy24x'.
(1) Windows VFAT file systems have different attributes stored for files. No UNIX-style users and groups, though it is possible to make a distinction between read-only and write-enabled.
(2) You can modify the fstab file with any editor that you like, but you must have root privileges to do that. Other than that, your settings for /mnt/win are OK - the problem has nothing to do with mounting, but with the the mounted filesystem.
Sorry to revive an old post like this, but I've got a couple of related questions:
1.) Does NTFS not support Unix-style permissions either (just out of curiosity)?
At low levels, linux file systems and ntfs has nothing to do with each other, and there's no exact match for everything. However, at driver level it's possible to approximate the behavior of both to a certain degree. How deep that approximation goes is something that I never bothered to research. It ultimately depends on the driver. If you use ntfs-3g you might find this useful:
If you use the in-kernel driver you don't have to bother because the write support is "limited" (non-existant if you ask me). Still anything that you need to know should be described on the relevant docs under the Documents subdirectory in your kernel source dir.
2.) When I extract files from a tar archive, the file permissions are preserved, even when the tar is saved on another file system. Would this hold true in all cases?
Permissions are stored inside the tarball when you create it. Whether these will be restored when uncompressing depend on two things: the usage (or not) of -p (preserve) and the support of the file system (or better said, the implementation of your concrete driver) to do something useful with that metainfo.
If your fs driver doesn't understand the permissions, then they are ignored.