2

I have a partition which is about 200 GB and I use it as a storage for my files. I tried to make it auto-mount, so I put this on /etc/fstab:

UUID=063C7A6B6  /media/user/storage   ntfs    defaults,user,uid=1000,gid=1000,dmask=022,fmask=113,exec  0  0

As you see, the fmask is set to 113, which means it won't run files. (I wanted this, because before that every file in the terminal was green and was marked as an executable file). Now, when I want to run a file and make it executable e.g:

chmod a+x file.out

It won't get executable. When I run:

ls -l *
-rw-rw-r-- 1 user user 100 Apr 28  2019 file.out

It's fmask is still 113. I don't want to change the default umask (because if I set it as 002, every file gets executable and becomes green in the terminal. Without that, for example, photos are purple and rar files are pink, so it is much readable).

How can I make a file executable without changing the default fmask? Isn't there any way to make the partition executable? By searching in forums, I found and added the exec option for mounting in /etc/fstab but it didn't work.

1 Answer 1

1

ntfs is the file system of MS Windows. It does not support Linux permissions. So by definition, you cannot change file permissions on such file system. In particular, you cannot set execute permissions on a per-file basis. One only can change permissions for the entire volume using the mount options, like you demonstrated.

Move any executables to an appropriate location on your system drive, and you will be fine.

You must log in to answer this question.

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