0

I split up my SSD into multiple partition due to work with multiple OS. One of the partition is used for Ubuntu, one for Windows, and one is accessed by both OS to exchange data.

I want to change the permission of the data in the shared partition to he permission set 755 by my Ubuntu OS.

sudo chmod 775 -R MyDocuments

whereby MyDocuments is a soft link to the third partition.

Why does my system still tell me this:

lrwxrwxrwx  1 jonas jonas   19 Apr 22 09:07 MyDocuments -> /media/MyDocuments/

All the data inside this partition is also permission set 777.

8
  • You need to chmod the mount point, and not the link. Sep 7, 2016 at 18:49
  • sudo chmod 775 -R /media/MyDocuments did not work neither
    – Natjo
    Sep 7, 2016 at 18:55
  • Is this a samba mount? Sep 7, 2016 at 18:57
  • All symlinks have dummy permissions like that and you can't change them. Also, you don't want to use the -R flag to chmod - you don't want all your files to be executable by everyone. Is the partition formatted NTFS? If so, then AFAIK you can't set Linux style permissions, but you can change the mount options to get the perms you want
    – Zanna
    Sep 7, 2016 at 19:02
  • 1
    You cannot change permisssions or ownership on NTFS, it just is not supported. You set a default set of ownership & permissions when you mount it. Best to use fstab if internal drive. askubuntu.com/questions/46588/how-to-automount-ntfs-partitions and: help.ubuntu.com/community/MountingWindowsPartitions Best to also mount Windows c: drive as read only to avoid issues.
    – oldfred
    Sep 7, 2016 at 19:28

2 Answers 2

0

NTFS-file-system doesn't support the UNIX-like permissions. Linux use NTFS-drivers to handle NTFS-partitions, so we can mount them and access the data stored on them.

By default, files and directories are owned by the effective user and group of the mounting process, and everybody has full read, write, execution and directory browsing permissions.

We can also assign permissions to a single user by using the uid and/or the gid options together with the umask, or fmask and dmask options. Example for fstab-entry:

/dev/sdxY /home/user/mnt ntfs-3g rw,uid=1000,umask=775 0 0

This will affect all files and folders on the NTFS-partition.

Enter this command in terminal

man ntfs-3g

for detailed information

The commands chmod and chown don't have any influence upon files and folders stored on the NTFS-partition.

0

The following will work for both your Ubuntu and Windows Drives. Jsut change the partition type in the /etc/fstab depending no the filesystem.

The Samba Server

For Samba you have to change the permissions on the sever and Client .

The server: /etc/samba/conf

Use the options:

create mask = 775
force create mode = 775
directory mask = 775

Or a variation there of.

You can also force the efective group and user of files and directories being created.

force user = [userID]
force group = [groupID]

The samba client
(https://askubuntu.com/a/726392/29012)

The client connection is via the /etc/fstab:

UUID="[partition uuid]"    /mount/shared_folder    ntfs    nofail,username=usernmae,uid=[1001],file_mode=0660,dir_mode=0775,credentials=/etc/smbpasswd 0 0

Fstab Line Explained:

  • The UUID - UUID of the partition. Using the UUID will is added surety of the resource being the same. In case other drives are mounted and the mounted order changes.
  • The Credentials - This provides for username and password to be hidden in a protected file, /etc/smbpasswd.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .