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.
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.
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).
thanks yowi, I will try that. I did have "users" in there ... you know that's the group my normalusers belong to ... maybe I got fizzled on that.
Cheers!
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
Maybe I need quotation marks around the umask? Maybe be 000 is not allowed. As usual there are a series of potential causes that one must test and eliminate.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.