How do I grant Read Permissons on a USB Hard Drive
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.
How do I grant Read Permissons on a USB Hard Drive
hello all:
I've just setup sftp on my Ubumtu 8.04 and now I'd like to grant access to an account with read only permissions to my USB Hard Drive. I've created and account, logged into the account which created the home directory, but when I try to access the USB Drive I cannot read or display the contents.
I'd like to setup read and file scan permissions on selected fileshare. So far the only way I was able to get access to the USB Drive was to log on to the my computer with my normal account, plug in the USB Drive which then was granted read/write permissions and then I could access it from the public internet using filezilla. When I log in using my guest account I cannot perform a directory listing, I get access denied. Any help would be greatly appreciated.
Here is the ls -l on the folder I'm trying to share:
Try creating a group (say sftp), do a chown -R mmiller:sftp SharedData (to remove the silly root group with no access), a chmod +x SharedData (so everyone can list the directory contents), and a chmod -R g+r SharedData/* so everyone in the sftp group can read the data).
Then add the users for whom you wish to grant access to the sftp group.
Note: I know nothing about ftp access control, so the above is how I'd go about granting members of a specific group access to files on a directory. Unless the ftp access requires a system login, the above is probably not applicable.
First, make sure that you use the UUID in your fstab entry so that the correct filesystem is referenced.
Which filesystem does it use? If it is fat32, then you need to use the uid, gid, fmask and dmask options to determine the permissions on the drive. For a native Linux filesystem, you can use the chown & chmod commands as indicated in the last post.
If a user to gain access isn't the owner or a group member, you can use ACLs to add another user with read access. Using a group would be a better idea.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.