LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Windows shares - auto mount problem (http://www.linuxquestions.org/questions/linux-networking-3/windows-shares-auto-mount-problem-142730/)

hopmedic 02-05-2004 03:38 PM

Windows shares - auto mount problem
 
I've been working on this problem for a while, and have tried numerous different solutions that I've found here, as well as other places on the net, and have yet to get my problem solved. I know this subject is worn out, but I've tried without success. Here's my setup:

Windows XP Pro system with files to share
Redhat 9 trying to auto mount the windows shares

First I tried putting this in /etc/rc.local
Code:

smbmount //windows/share /mnt/point -o rw,username=xxx,password=xxx
I could get the share mounted, but only root had write permissions. chmod 777 did not work - I could not change the permissions of the shares, even as root. If I launched the application that I wanted to use as root, I could open/read/write as expected. If I launched as a user, only rx permissions granted.

Then I tried putting this in /etc/fstab:
Code:

//windows/share /mnt/work smbfs username=xxx,password=xxx 0 0
I'm sure the answer is right in front of my face, but try as I might, it's not working. I appreciate any help you can give me.

Thanks,

Rich

david_ross 02-05-2004 03:47 PM

Try adding a umask option:
umask=0000

hopmedic 02-05-2004 09:46 PM

David,

I've tried several variations of what you suggest - using both 0000 and 0777 as the umask value, to no avail. Any other suggestions? I should note that the permissions of my mounted share show up as follows:
Quote:

drwxr-xr-x 1 root root 4096 Jan 1 1980 mountpoint
With the following, I get automatic mount, but no write permissions except for root
fstab:
Code:

//windows/share /mnt/point smbfs umask=0777,username=xxx,password=xxx 0 0
rc.local
Code:

smbmount //windows/share /mnt/point -o username=xxx,password=xxx
With the following, it's the same... and when I try to chmod as superuser, I get
Quote:

chmod: changing permissions of `shamim_c' (requested: 0777, actual: 0755): Operation not permitted
fstab:
Code:

//windows/share /mnt/point smbfs umask=0777,rw,username=xxx,password=xxx 0 0
rc.local
Code:

smbmount //windows/share /mnt/point -o username=xxx,password=xxx
With the following, it's the same - the share is mounted, but no write permissions except for root. chmod as root results in:
Quote:

chmod: changing permissions of `shamim_c' (requested: 0777, actual: 0755): Operation not permitted
fstab:
Code:

//windows/share /mnt/point smbfs username=xxx,password=xxx 0 0
rc.local
Code:

smbmount //windows/share /mnt/point -o umask=0777,username=xxx,password=xxx

Ditto with the following:
fstab:
Code:

//windows/share /mnt/point smbfs username=xxx,password=xxx 0 0
rc.local:
Code:

smbmount //windows/share /mnt/point -o umask=0000,username=xxx,password=xxx
I don't know what to do to get this to work, and would really appreciate your help.

Thanks,

Rich

david_ross 02-06-2004 01:55 PM

Try:
umount /mnt/point
smbmount //windows/share /mnt/point -o umask=000,username=xxx,password=xxx

hopmedic 02-07-2004 10:14 PM

David,

Thanks! I ended up tying your suggestions with ones that I gleaned from http://www.linuxquestions.org/questi...threadid=47914 and ended up with the problem solved. Here's the code I ended up using:
Code:

fstab:
//win/share /mnt/point smbfs username=xxx,password=***,gid=groupname,umask=000,fmask=0777,dmask=0777,rw,user 0 0
rc.local:
smbmount //win/share /mnt/point -o umask=0000,fmask=0777,dmask=0777,username=xxx,password=***

With this configuration, I get what I needed - automatic mounting and rwx permissions. Thanks again!

Rich


All times are GMT -5. The time now is 04:58 PM.