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.
My problem is that I am only able to write to samba shares as root (i.e. the drives on my windows box that are being shared). I've tried chmod-ing both the mount directory and the share itself (after mounting), to rwxrwxrwx. When I change the permissions for the mount directory it goes well and the permissions are set accordingly but doesn't get me read or write access to the share. When I mount the share the access drops to rwx-r-xr-x. When I tried chmod-ing the share, although the chmod command doesn't complain of an error, the modifications do not take place.
Does anybody have any idea how I can resolve this
While I'm here I may as well mention, my attempts to get the share into fstab have been unsuccessful. I have added ...
to my fstab but it complains that the line isn't valid when the system boots. Not the most revealing of errors. It mounts fine with the line...
mount -t smb //Nova/d /mnt/D -o password=pass
Thanks to anyone who has the time and inclination to reply.
your problem is with your fs designator. use smbfs instead of smb. try this line
//Nova/d /mnt/D smbfs username=user,password=pass,uid=<username on linux>,gid=<groupname on linux coinsiding with *nix user> 0 0
this will say that you are the owner of the folder. one other thing you may try, mount the win to a folder under /home/<user>/samba_mount. this is what i do for ease and accessibility. just some ideas.
==========
edit
==========
almost forgot about the "rw" at the end. that will give read/write permissions to you.
here is mine
//WINXP-BOX/WINXPSHARE /home/joe/xpdrive smbfs username=!JOE,password=<**********>,uid=joe,gid=joe,rw 0 0
<**********> is replaced by my winxp password that i am not going to put on the net. it coincides with the username <!JOE>.
That allows me to write to the share as the user I specify, but not the other members of the same user-group. Is there any way I can add other users to that, or preferably a group.
I tried specifying just the group (gid=vanilla) but that didn't work, so I think I can safely presume that's because the permissions are rwxr-xr-x, so only the user can write.
I can't seem to change the persmissions to rwxrwxr-x with charmod though.
When I tried that the user went back to root and I could only write to the share as root again.
with the entry...
//Nova/d /mnt/D smbfs username=user,password=pass,user,rw 0 0
maybe you can creat several mounts. one for each user with their own access. meaning put the mount under "/home/<user>/mount_folder" for each user. and make an fstab entry for each user. understand?? kool.
Neuronet, I've been having the same problems for a couple of days now. But tonite, after doing some more indepth research (google.com/linux) I hit gold. it all involves setting the fmask and dmask settings ( just like the umask if it was a vfat partition you were mounting).
Is anybody here able to mount shares as a nonroot user. Like for example, if I use LineNeighborhood to browse the network, and then I try to mount a share in my own directory, LineNeighborhood wil complain with the following error:
"smbmnt must be installed suid root for direct user mounts (1000,1000)
smbmnt failed: 1"
Any ideas. I've been searching for a solution to this for quite a while. Now that I know how to mount shares (as root) so that anyone can read and write to them, it would be nice to be able to mount them as a user in my own directory too.
You would need to do two things to make the drive mountable by a user.
1. make the directory /mnt/smbshare world writable
(where /mnt/smbshare is the directory that you want to mount to) with chmod 777 /mnt/smbshare
2. edit the fstab to make the device writable to users and also mountable.
The bits of importance are the fmask & dmask parts (to make sure the share is accessable to plain users - as described above) and the user part to make sure the drive is user mountable.
That's from what I understand. I've done it with other drives but never a share, though I see no reason why it wouldn't work.
Is anybody here able to mount shares as a nonroot user. Like for example, if I use LineNeighborhood to browse the network, and then I try to mount a share in my own directory, LineNeighborhood wil complain with the following error:
"smbmnt must be installed suid root for direct user mounts (1000,1000)
smbmnt failed: 1"
, finally, after days of breaking my head, trying to do this, I was able to fire up LineNeighborhood as a regular user and mount network shares in my own folder. Now I don't need to become root, or neither do I have to type it in in fstab. Well, for those who might be interested, as root type in these commands:
Originally posted by figadiablo , finally, after days of breaking my head, trying to do this, I was able to fire up LineNeighborhood as a regular user and mount network shares in my own folder. Now I don't need to become root, or neither do I have to type it in in fstab. Well, for those who might be interested, as root type in these commands:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.