0

I am using Linux on a VMware on Windows and added a second HDD device today. However, each file or any dictionary that is created on the new device gets executable permissions which are not removable (even using root rights). While using ls, the folders are highlighted in green which I don´t want to have. I guess this is more related to the VM rather than Linux. Changing the file permission (removing the executable permission) as sudo chmod -x myFile will not give any change. Does anybody know, why each added file ends up with the executable flag and how one could remove it? Any answer is highly appreaciated. Thank you in advance, Tobi

2

It sounds like you're trying to use NTFS (or FAT) file system on linux and struggle with file permission.

By default those fs do not support unix-style permission, but you can defined a default one in mount options

sudo mount -t ntfs -o rw,auto,user,fmask=0133,dmask=0022 /dev/drive /mnt/point

This will assign 644 to all the files and 755 to all the directories on mounted drive.

Even though, there is a way to enable unix permission on NTFS drive by adding permissions to mount options. However you need to define user mapping in order to use it. See man ntfs-3g for more details.

FAT doesn't support this in any way though.

  • Yes it is a NTFS file system as I am not allowed to use any other file system (it is pre-defined by the company I am working for). I will try your suggestions and get back. Thank you in advance @rush – Tobi Jun 25 at 14:10
  • NTFS dose support execute-bit. However MS-Windows always sets this bit on every file (for backwards comparability with CP/M). – ctrl-alt-delor Jun 25 at 14:40
  • The problem while loading the device like that is, that I get an run-time error while running my application. Feiled to load .../.../*.so. Any suggestions. – Tobi Jun 25 at 16:39

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.