0

In my Fedora I have some additional HDD with partition mounted as /media/dilnix/data witch contains the most of my huge files sorted in folders like "Music", "Downloads", "Video" etc.

Those folders are targets for my symlinks in home folder. Like

/home/dilnix/@Video to /media/dilnix/data/Video
/home/dilnix/@Downloads to /media/dilnix/data/Downloads
etc.

My last 2 entries of fstab are following:

UUID=355ba039-6126-4c36-ba6a-8ff4f2ee79e8 /media/dilnix/data      ext4    defaults,noatime,user   1 2
UUID=24dd893c-07dd-4f52-85c5-066773f74c0f /home                   ext4    defaults,noatime        1 2

The problem is when I trying to run some application or script from "Downloads" folder (and from deeper) I getting error like following:

bash: ./mktool: permission denied

Permissions of files for example script I have used:

[dilnix@localhost mktool-master]$ ll -Z
загалом 36
drwx------. 3 dilnix dilnix unconfined_u:object_r:user_home_t:s0  4096 чер  8  2015 .
drwxrwxr-x. 3 dilnix dilnix unconfined_u:object_r:user_home_t:s0  4096 січ 16 11:38 ..
-rwxr-xr-x. 1 dilnix dilnix unconfined_u:object_r:user_home_t:s0 18448 чер  8  2015 mktool
-rw-rw-r--. 1 dilnix dilnix unconfined_u:object_r:user_home_t:s0   612 чер  8  2015 README.md
drwx------. 2 dilnix dilnix unconfined_u:object_r:user_home_t:s0  4096 чер  8  2015 tools
[dilnix@localhost mktool-master]$ getfacl mktool 
# file: mktool
# owner: dilnix
# group: dilnix
user::rwx
group::r-x
other::r-x

What the thing that I missed in my configuration to make my additional folders work as part of my home??

I tried to temporary disable SELinux, but it's not a reason because of error continue to appear.

9
  • @ilkkachu, updating my post with permissions of files, please look
    – dilnix
    Jan 16 '18 at 9:40
  • Is the partition mounted with exec (or something that implies exec, like defaults)?
    – muru
    Jan 16 '18 at 9:45
  • @muru, yes, please look at fstab quote, there is "defaults,noatime,user"
    – dilnix
    Jan 16 '18 at 9:50
  • From man mount, for user: This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).
    – muru
    Jan 16 '18 at 9:52
  • ok @muru, thanks for this, it's my fail =) but one more question... if I remove "user" option from fstab will this not break my access to files after next restart?
    – dilnix
    Jan 16 '18 at 9:56
2

From man mount, the user mount option implies `noexec:

user  Allow an ordinary user to mount the filesystem.  The  name  of
      the  mounting  user  is  written  to  the mtab file (or to the
      private libmount file  in  /run/mount  on  systems  without  a
      regular   mtab)  so  that  this  same  user  can  unmount  the
      filesystem again.  This option  implies  the  options  noexec,
      nosuid, and nodev (unless overridden by subsequent options, as
      in the option line user,exec,dev,suid).

So you could remove the user option, or change the mount options to something like defaults,noatime,user,exec,suid.

1
  • It also implies noexec? Curious! I can understand nosuid and nodev, they're clear security issues, but just being able to execute files doesn't seem to be bad, right?
    – ilkkachu
    Jan 16 '18 at 10:56

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.