Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba Mount Ownership 2

Status
Not open for further replies.

pzepernick

Programmer
Feb 16, 2004
13
0
0
US
Can someone tell me how to change the ownership, and permissions on a mount to a windows share? I have been able to mount a windows share, but when the mount is performed the ownership always goes to root root, and permissions 755. When I try to change the ownership or permissions, I get the following error:

chown: changing ownership of `/myshare': Operation not permitted

I am trying to do this under the root user.

I have also tried to run the mount command under the user that I wish to have ownership, and it says that only root is permited to perform the operation. Below is the command that I am using to mount the directory to my windows share:

mount -t smbfs -o username=myuser,password=mypass //zepernick/backups /myshare

I am running Mandrake 10.0

Can anyone shed any light on this?

Thanks,

Paul Zepernick
 
when you mount add to the options a uid=,gid= and put the correct uid and gid. This will mount the share with that uid/gid ownership.

smbmount -o username=user%password,uid=501,gid=100
 
Thank you very much. Is there anyway to change the permissions on the folder from 755 to 775 so that the group can also have write access, or when I specify the gid is it going to automatically give it 775?

Thanks,

Paul
 
add dmask=0775

Also try running a man on smbmount to a list of all the options. There might be others you don't realize that you need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top