Deldran
Deldran

Reputation: 153

Remote NTFS permisisons with fstab

I am trying to mount a ntfs partition via cifs in /etc/fstab. I have set umask=000 but still not getting 777 permissions on the mounted drive. I really need to get this figured out asap. I have been seaching for the past hour without much luck.

Below is my fstab entry. Anyhelp would be great thanks.

//172.21.0.11/IMPORTS   /i/hjs/to               cifs    credentials=/i/.wincred,iocharset=utf8,sec=ntlm,umask=000       0 0

Here is the reported permissions on the mountpoint

drwxr-xr-x 1 root root 16384 May  4 11:00 to

Upvotes: 0

Views: 1098

Answers (2)

Deldran
Deldran

Reputation: 153

I actually solved the issue. Below is the fstab entry that fixed it. It needed the file_mode and dir_mode options

//172.21.0.11/IMPORTS   /i/hjs/to               cifs    credentials=/i/.wincred,iocharset=utf8,file_mode=0777,dir_mode=0777     0 0

Upvotes: 0

FOP
FOP

Reputation: 1022

1- Create an empty folder, as /home/local_user/folderserver

2- Chown the local_user to the folder if the folder is outside his home. (same with the local_user group)

3 Edit (as root) /etc/fstab and append:

//ip_Server/folder_in_server /home/local_user/folderserver cifs username=remote_user,password=remote_user_password,rw,users,uid=local_user,gid=local_user_group 0 0

Example

//192.168.1.106/DATA_SHARED /home/fernando/shared cifs username=theuser,password=thepassword,rw,users,uid=fernando,gid=users 0 0

Remember

1- folder in server must have read and write access to the remote_user.

2- Remote_user and remote_user_password is the user and password to get into remote share folder.

3- local_user (group and password) is the local user.

Upvotes: 1

Related Questions