1

I made the following changes in /etc/fstab, after doing this any file i create in any of the partitions has executable permission.

Pls help me out.

This is my /etc/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/sda10 during installation
  UUID=89e6ce75-1460-4c7e-ab26-ada11484cf4e  /            ext4  errors=remount-ro                  0  1  
# swap was on /dev/sda11 during installation
  UUID=fb568186-5d39-4a60-9412-c254a0489490  none         swap  sw                                 0  0  

  UUID=905848155847F90C   /media/EDUCATIONAL      ntfs-3g    defaults,auto,uid=1000,gid=100,dmask=027,fmask=137,umask=007  0  0 
  UUID=CEB008F2B008E337   /media/ENTERTAINMENT    ntfs-3g    defaults,auto,uid=1000,gid=100,dmask=027,fmask=137,umask=007  0  0  
  UUID=7216C6C016C68517   /media/PROJECTS         ntfs-3g    defaults,auto,uid=1000,gid=100,dmask=027,fmask=137,umask=007  0  0 

and when I list my files, I see that all have executable permissions.

-rwxrwx--- 1 manu users 1213 Apr 20 20:28 message_receive.c
-rwxrwx--- 1 manu users 1111 Apr 19 16:02 message_send.c
-rwxrwx--- 1 manu users 1110 Apr 19 16:06 message_sender1.c
-rwxrwx--- 1 manu users 1110 Apr 19 16:06 message_sender2.c
-rwxrwx--- 1 manu users 1111 Apr 19 16:07 message_sender3.c
-rwxrwx--- 1 manu users 7442 Apr 20 20:41 receiver

I want permissions like this

-rw------- 1 manu manu 1213 Apr 20 20:28 message_receive.c
-rw------- 1 manu manu 1111 Apr 19 16:02 message_send.c
-rw------- 1 manu manu 1110 Apr 19 16:06 message_sender1.c
-rw------- 1 manu manu 1110 Apr 19 16:06 message_sender2.c
-rw------- 1 manu manu 1111 Apr 19 16:07 message_sender3.c
-rwx------ 1 manu manu 7442 Apr 20 20:41 receiver

I want the above permissions what changes should I make the in the fstab?

all the above files are created in /media/PROJECTS. Here all the files I create had executable permission, I don't want that to happen only the executable files should have executable permission.

Your Answer

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

Browse other questions tagged or ask your own question.