LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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


Reply
  Search this Thread
Old 01-24-2004, 10:44 PM   #1
calbazon
LQ Newbie
 
Registered: Jan 2004
Location: Albuquerque, New Mexico, USA
Distribution: Redhat 9
Posts: 4

Rep: Reputation: 0
Unhappy 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?
 
Old 01-25-2004, 12:01 AM   #2
rlkiddjr
Member
 
Registered: Feb 2002
Distribution: FreeBSD 4.9
Posts: 69

Rep: Reputation: 15
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
 
Old 01-25-2004, 12:34 AM   #3
calbazon
LQ Newbie
 
Registered: Jan 2004
Location: Albuquerque, New Mexico, USA
Distribution: Redhat 9
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 01-25-2004, 04:16 AM   #4
jamie_barrow
Member
 
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107

Rep: Reputation: 15
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
 
Old 01-25-2004, 09:43 AM   #5
rlkiddjr
Member
 
Registered: Feb 2002
Distribution: FreeBSD 4.9
Posts: 69

Rep: Reputation: 15
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
 
Old 01-25-2004, 10:43 AM   #6
calbazon
LQ Newbie
 
Registered: Jan 2004
Location: Albuquerque, New Mexico, USA
Distribution: Redhat 9
Posts: 4

Original Poster
Rep: Reputation: 0
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....
 
Old 01-27-2004, 11:52 AM   #7
jamie_barrow
Member
 
Registered: Jul 2003
Location: Gauteng, South Africa
Distribution: Windows XP, yup :D Will be back onto Ubuntu probably someday
Posts: 107

Rep: Reputation: 15
Sure thing. Ours are basically the same, but his is better as he actually lists the options you needed
 
Old 10-10-2010, 12:13 AM   #8
Beauford2008
LQ Newbie
 
Registered: Sep 2008
Posts: 28

Rep: Reputation: 0
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.
 
Old 10-10-2010, 01:35 AM   #9
Beauford2008
LQ Newbie
 
Registered: Sep 2008
Posts: 28

Rep: Reputation: 0
Found it. Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't write to Samba Share perihelion Linux - Software 21 03-12-2012 10:39 AM
Can't write to Samba share from Windows Needlotsahelp Linux - Newbie 3 07-30-2005 08:32 PM
Can't write to Samba share erikcw Linux - Software 3 01-26-2005 03:59 AM
Unable to write to Samba Share sephiro499 Linux - Newbie 8 11-30-2004 12:05 PM
Can't write to Samba share...any suggestions? _TK_ Linux - Newbie 4 02-11-2001 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration