LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Can't chmod/chown a dir after smbmout !? (https://www.linuxquestions.org/questions/linux-security-4/can%27t-chmod-chown-a-dir-after-smbmout-279595/)

Ramu 01-19-2005 01:26 AM

Can't chmod/chown a dir after smbmout !?
 
Hi Friends,

As a root I can chown a dir say /rock to ramu:ramu.
I smbmounted a windows dir onto this.
Now /rock permissions are set to root:root.
I issues chown command to set it to another user say, ramu.
It appears that the command worked, [no warnings given]
But " ls -l " shows root:root for /rock.

Now user ramu is unable to creat any file under the smbmounted /rock.

Any workaround in your minds please...

jtshaw 01-19-2005 01:52 AM

I don't believe smbmounted fs's support changing owning users or groups. The problem is some smbmounted shares could be filesystems that don't have those permissions. I believe the owning user/group is automatically set to the user/group that mounts the fs. This is the same behavior you'd see if you mounted a local fat32 disk.

Ramu 01-19-2005 09:24 AM

With a little bit of tinkering I found the solution.
It works with the following command...

mount -t smbfs -o username=ramu -o uid=ramu -o gid=ramu //winsys/sharedfolder /linuxsys/mountpoint

Now you have set ramu as the user and his group as owners of the mounted smb filesystem.

Now you can upload and download files from /linuxsys/mountpoint.

Thanks buddy for responding to my post.


All times are GMT -5. The time now is 11:46 AM.