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.
Command used as root to mount a Windows 2003 server share to Linux Red Hat 4 x86-64 on Dell: mount -t smbfs -o username=user,workgroup=domain.edu,password=password //server.domain.edu/h$ /mnt/test
The mount is successful, but only root can write to the mount. How do I set the permissions on the mount to allow certain users read/write access to the share? I am logged on the Linux server as the same user who authenticated the mount. The user can read write on the Windows server share, but not while loggged into the Linux server.
Thank you,
Curt Swartzlander
DBA
Last edited by clozarks; 05-07-2010 at 10:21 AM.
Reason: remove poll
Click here to see the post LQ members have rated as the most helpful post in this thread.
is that only the root user would have read/write access to the share. All other users would have read only access to it. If you wanted read/write access to it for yourself, you need to specify your userid or groupid. That would change the line in /etc/fstab to look like this:
Whatever user and or group you specified in the line would have read/write access to the mounted share. You can use either the user or group name or the user or group numerical ID. Either should work.
If you had several users you wanted to have read/write access to it, create a group and add those users to the group. Then specify just that groupid in the /etc/fstab file. You wouldn't need to specify a userid. The line in etc/fstab would look like this:
Thank you for the reply. If this mount is not permanent, but I only want to mount this as runtime and then remove the mount, can I still grant user permissions to write at runtime? Does the mount need to be in the /etc/fstab file?
No its not needed if you want to go with temporary entry.
Just run the same command on commandline terminal rather than storing it under /etc/fstab.
No difference at all.
That did it! Adding the gid and uid to the command changed the permissions on the mount. Thank you for the help! One more question ... how long will the mount persist if I do not unmount? Will it persist until Linux server reboot? And does having a temporary mount (not in fstab) cause any issues (i.e. network performance) on the Linux server?
One other question ... I noticed that Red Hat Article 1984 "Can an NFS mount be shared out via samba under Red Hat Enterprise Linux?" that there may be issues with sharing a directory that is also an NFS mount point: "Red Hat does not recommend or support this type of configuration, where samba is used to re-export an NFS mounted file system.".
Can you confirm the way I have the smbfs mount point is not an issue? I do not know what re-exporting an NFS mounted file means, and I want to make sure that possible corruption is not a problem because of the way I have the Windows file system mounted on Linux.
Basically, there is more than one way of sharing a dir, including nfs & Samba. That quote just means that you should decide on one method and not try to simultaneously share it via nfs & Samba. Check your /etc/exports file for your nfs shares (on the server).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.