0

This question already has an answer here:

I am trying to change permission and change the group permission of the folders which are shared through SAMBA (Samba PDC). Commands are as follows:

# chmod 766 /mnt/Format

but nothing changed.

Please help.

marked as duplicate by Avinash Raj, precise, waltinator, jobin, souravc Mar 21 '14 at 20:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Is this share on local PC or is mounted from network drive? – Danatela Mar 19 '14 at 7:49
  • share is in local pc different partition (NTFS) – Bishwanath Das Mar 19 '14 at 8:35
3

The problem is because you use POSIX-specific command (chmod) to change non-POSIX-compliant filesystem (NTFS). The chown command also does not work on such filesystems. To change permissions on NTFS shares you should use mount options.

From man mount.ntfs:

OPTIONS
       Below is a summary of the options that ntfs-3g accepts.

       uid=value and gid=value
              Set the owner and the group of files and directories. The values
              are  numerical.  The defaults are the uid and gid of the current
              process.
...
       permissions
              Set  standard  permissions  on  created  files  and use standard
              access control.  This option is set by default when a user  map‐
              ping file is present.

So, instead of using

chmod 766 /mnt/Format

use

mount -o uid=UID,permissions,remount /mnt/Format

See man mount.ntfs for further help. There is nice EXAMPLES section which helps understanding how mounting works.

Not the answer you're looking for? Browse other questions tagged or ask your own question.