can't mount samba share and then write to the share
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.
can't mount samba share and then write to the share
I would like to link, mount or otherwise associate a samba share on my Redhat 9 machine so that I may use it (read and write) just like it was on my Redhat machine.
I tried this:
made a subdirectory in my home folder called winmachine.
then, as root, did
# mount -t smbfs //winmachine/c /home/user/winmachine/
I can then see the windows share in my home directory but I don't have write permissions. I can't change the premissions of that subdir, even as root.
When you mounted the share, you mounted as root. This made all the files belong to root. The reason you can not change the file permissions is because the share is overriding it.
To get around that, when mounting the smb share use the uid=, or gid= statement in the command. At that point if you are the user or belong to that group then you can do anything that you want.
Thanks so very much! That problem was driving me nuts!
One last thing.
How can I get Linux to do that at boot? I get asked for a password for the samba share when mounting it so do I have to pass that in to the command? How? Thanks again!
It worked like a charm! Thanks again for all your help! I was searching all over the Internet looking for a solution because I don't like to post questions when someone else has already posted a solution somewhere but after no luck I tried here. Great advice!
Jamie, thanks for your post! I did not try your solution because rlkiddjr's worked the first time right out of the box but thanks for posting! I really appreciate it!
Doc....
I have the same problem and came across this post and tried what it said, but I can still not write to my Windows shares from Slackware - permission denied.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.