Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 4547  / 1 Year ago, sun, december 18, 2022, 12:27:06

I have set up an NTFS partition to automount via fstab:



# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda7 during installation
UUID=e63fa8a2-432f-4749-b9db-dab328807d04 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda4 during installation
UUID=e9ad1bb4-7c1f-4ea9-a6a5-799dfad71c0a /boot ext4 defaults 0 2
# /home was on /dev/sda8 during installation
UUID=eda8c755-5448-4de8-b58c-9cb75823c22d /home ext4 defaults 0 2
# swap was on /dev/sda9 during installation
UUID=804ff3a7-e5dd-406a-b63c-e8f3c635fbc5 none swap sw 0 0

#Windows-Partition
UUID=368CEBC57807FDCD /media/Share ntfs defaults,uid=1000,gid=1000,noexec 0 0


As you can see I have added the noexec bit to the configuration. Why? Because any file I create on or move to the partition is automatically marked as executable.



The problem is that there is no way of changing that through nautilus. I cannot uncheck the "Allow executing file as program" option.



The noexec option doesn't help, unfortunately. It only prevents nautilus from displaying the "run" or "read" dialog but doesn't change the executable flag.



Is there any way I can fix this?


More From » nautilus

 Answers
4

With January's help I was able to find the following fstab options that solved my problem:



umask=0000,fmask=0111


The fstab entry for my NTFS partition is now as follows:



#Windows-Partition
UUID=368CEBC57807FDCD /media/Share ntfs defaults,uid=1000,gid=1000,umask=0000,fmask=0111 0 0


Source: http://www.linuxquestions.org/questions/slackware-14/mount-ntfs-so-that-files-are-not-executable-buts-directories-are-363315/



Edit: Changing these options also means that you will not be able to set anything to executable on your NTFS drive. In my case that's not a problem as I don't plan on storing any executables on this partition.


[#35854] Monday, December 19, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
untroo

Total Points: 3
Total Questions: 110
Total Answers: 95

Location: Palestine
Member since Thu, Oct 28, 2021
3 Years ago
untroo questions
;