Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
You're not very specific about your situation but the mount option "user" may meet your needs.
From man fstab:
Common for all types of file system are the options ‘‘noauto’’ (do not mount when "mount -a" is given, e.g., at boot time), ‘‘user’’ (allow a user to mount), and ‘‘owner’’ (allow device owner to mount), and ‘‘comment’’ (e.g., for use by fstab-maintaining programs).
user/users is applicable if the users are mounting the filesystem, if it's being mounted by root then you will need to play around with mount options and/or permissions, depending on what FS type it is you are mounting.
See man mount for the gory details.
If the file system is being mounted from fstab, then you need to pay attention to the file system you are using. With regular file systems you need "rw", which is the default anyway. The rest of the problem is giving access and write permission into the mount point once the drive is mounted. The owner also matters, this can be easily checked with ls -ld <mountpoint> once the drive is mounted. And can be changed with chmod and chown.
Different file systems might have different options to set the effective UID and / or GID for the mount, and others, like ntfs or fat which do not support the Linux scheme, just emulate all the permissions. So the can't be set using chmod nor chown. Instead they are set at mount time via the umask option. Use umask=000 for full permissions.
Note that the user and users options are not directly related to permissions. They just allow the regular users to mount drives, but that doesn't imply that they will have write permissions, at all. You should really check the man page for fstab, and, even more important, the man page for mount, where all the options (including all the ones I mentioned in this post) are described.
I think i92guboj hit the nail on the head; chmod is your friend. Specifically, (assuming this is a mounted linux partition) try
[sudo] chmod 1777 <mount point>
This will give the same permissions typically assigned to /tmp, ie: all users would be allowed to create files & directories but not clobber those of other users (unless of course their permissions allow it). BTW, I would recommend you NOT do this for any partition that is used by the system (like /, /var, /usr, /etc, etc).
i am aware of the different mechanisms, such as chmod and special situations with ntfs. my latest experimentations have focused on the umask property as the possible "panacea" or "magic combo" that I'm looking for.
However, I have not progressed much.I still get into trouble with an "easy" case, that is ext3
You need to get off this "The key to this is fstab" kick. You're getting the error because "umask=000" is not applicable to ext3 filesystems. rw ext3 permissions are controlled by standard unix permission mechanisms. At the risk of repeating myself, chmod is your friend. You don't need the "user" in the fstab line (the system will mount it at boot). You want to change the last "0" in your fstab to "2" so the partition will be fsck'd. In other words, change fstab line to:
/dev/sda6 /mnt/sda6 ext3 auto,rw 0 2
then (one time only - as root or using sudo):
prompt> [sudo] mount /mnt/sda6
prompt> [sudo] chmod 1777 /mnt/sda6