3

Our Ubuntu Server 12.04 system has a remote NTFS filesystem mounted via Samba at /media/blarg.

One of our users had problems writing to the remote system, but not reading from it.

Since the auto-mount script we've set up has a different user (we'll call it sagaba) mounting the remote system, I figured I'd change the permissions for /media/blarg to 774 sagaba:sagaba, and make our user a member of the sagaba group, so he can go about his business.

Unfortunately, when I attempt this (even as root), I get a permission denied error.

chown: changing ownership of `/media/blarg': Permission denied

Does this have to do with root squashing? I can't understand how it would, since the mount point is a directory on the local system.

6

You can't modify the file permissions of a NTFS filesystem mounted via CIFS on the VFS by default. Even when chmod and chown don't complain, they have no effect under these filesystems.

Your best chance is to use mounting options to do the work. That is, define the permissions at mounting time. Take a look at man mount.cifs for the parameters uid and gid.

Please note that CIFS supports chmod and chown when you are serving ext4 filesystems, but not when serving NTFS filesystems. NTFS mounting support permissions, but they are disabled by default because you need to map the Windows User IDs (SID) to UIDs on your system. Please take a look at the article pointed on the comments by Eliah Kagan. Even when you can make the permissions mapping and make the permissions work with a direct mount, I don't know if they will work trhough CIFS, though.

  • 2
    This is untrue. (1) Editing permissions CIFS/SMB works out-of-the-box, with zero configuration! Perhaps you're experiencing a problem relating to the underlying filesystem on the server (e.g., maybe it's FAT or NTFS). When I share an ext4 partition from one Ubuntu system to another with Samba, permissions and ownership work fine. (2) FAT filesystems really don't support permissions, you're right about this. (3) NTFS filesystems do support ownership and permissions and are almost completely compatable with chmod, but not quite; changing them with chown/chmod works but is off by default. – Eliah Kagan Jan 14 '13 at 23:35
  • See this article for details. – Eliah Kagan Jan 14 '13 at 23:36
  • article link expired so here is link from web archive – Bala Krishnan Jan 17 '17 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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