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.
Hello.
Though I searched the forum, I couldn't find answers to this question; maybe it's just too easy...
I think I'm too stupid to understand how mount options work.
I looked at the man pages of mount and fstab, but I cannot understand.
I'd just like to have read/write access, as normal user, to a certain partition.
I tried many combos of rw, default, user, exec, noauto, and the like, with no success.
The user can mount the partition, but cannot write in it, due to permissions.
The partition fs is ext3.
You change permissions (or modes) with chmod. This:
Code:
chmod 777 files
Gives full permissions to everybody. The three numbers refer to file owner, group, and everybody else. 7 means read-write-execute, 6 means read-write, 5 read-execute, 4 read, 2 write, 1 execute (notice that you simply add the numbers to combine the different permissions).
Thank you for your reply.
I know I could change permissions using chmod, but I would like to mount the partition in order to let the mounter (user) read/write in it.
I'd have to edit /etc/fstab so that any user could simply do:
mount /this-partition
and have read/write access.
How is this achieved?
What you could try is mounting the partition with the umask option.
Try something like this
Code:
mount -o umask=000 /dev/device /mnt/mount_point
A umask of 000 will give the persmissions rwxrwxrwx to that partition. I usually use an option of 022. Which is rwxr-xr-x. Umask sort of works backwards, 000 = 777, 022 = 755 etc... Play around till you find one which works for you.
Take note that if the parition you are mounting is NTFS, although it can be done, writing to a NTFS parition is somewhat dodgy. Best google around before you start writing to it.
Originally posted by moby
I could be wrong, but at the mount point directory you can also chmod the permission of the access.
And I did.
I created the mountpoint as an ordinary directory, owned by the no-root user.
As this no-root user mounts it, its owner becomes root, and the user cannot write into it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.