Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
01-24-2004, 10:44 PM
|
#1
|
LQ Newbie
Registered: Jan 2004
Location: Albuquerque, New Mexico, USA
Distribution: Redhat 9
Posts: 4
Rep:
|
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.
Any ideas? 
|
|
|
01-25-2004, 12:01 AM
|
#2
|
Member
Registered: Feb 2002
Distribution: FreeBSD 4.9
Posts: 69
Rep:
|
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.
Hope this makes sense
|
|
|
01-25-2004, 12:34 AM
|
#3
|
LQ Newbie
Registered: Jan 2004
Location: Albuquerque, New Mexico, USA
Distribution: Redhat 9
Posts: 4
Original Poster
Rep:
|
Wow! You rock!
Well, what do ya know? It worked!
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!
Doc...
Last edited by calbazon; 01-25-2004 at 01:00 AM.
|
|
|
01-25-2004, 04:16 AM
|
#4
|
Member
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107
Rep:
|
I'm not sure about this, but I think it may work:
In the file /etc/fstab is where all the mountpoints are declared for your system.
For your requirements, its format is this, per line:
DEVICE MOUNT_PATH MOUNT_TYPE OPTIONS 0 0
so for your share, you would add a line:
//winmachine/c /home/user/winmachine smbfs OPTIONS
...where options is whatever options you decide on - try "# man fstab" and "# man mount" for more info.
The most probable OPTIONS would be:
auto,user,_netdev
...which should mount the share at boot time or when "mount -a" is called, and only when network is available.
I hope this works
Jamie --- Proudly South African
|
|
|
01-25-2004, 09:43 AM
|
#5
|
Member
Registered: Feb 2002
Distribution: FreeBSD 4.9
Posts: 69
Rep:
|
Put something like this in your /etc/fstab file. Of course fill in the correct values. Which everone of the ids you are not using just set it to 0.
//server/share /some/mountpoint smbfs password=password,uid=?,gid=?,username=username 0 0
Hope this helps
|
|
|
01-25-2004, 10:43 AM
|
#6
|
LQ Newbie
Registered: Jan 2004
Location: Albuquerque, New Mexico, USA
Distribution: Redhat 9
Posts: 4
Original Poster
Rep:
|
Wow again rlkiddjr!
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....
|
|
|
01-27-2004, 11:52 AM
|
#7
|
Member
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107
Rep:
|
Sure thing. Ours are basically the same, but his is better as he actually lists the options you needed 
|
|
|
10-10-2010, 12:13 AM
|
#8
|
LQ Newbie
Registered: Sep 2008
Posts: 28
Rep:
|
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.
This is my fstab entry:
//192.168.58.100/windows /home/username/share smbfs password=password,uid=100,gid=10,username=username 0 0
It mounts fine, but only root can write to it. I can see it and access the files, but can't save move, delete, etc.
Any help is appreciated.
B
Last edited by Beauford2008; 10-10-2010 at 12:15 AM.
|
|
|
10-10-2010, 01:35 AM
|
#9
|
LQ Newbie
Registered: Sep 2008
Posts: 28
Rep:
|
Found it. Thanks
|
|
|
All times are GMT -5. The time now is 07:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|