Setting permissions for folder access
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Setting permissions for folder access

    Hi I have besides the usual root login my usual login user.

    There is a partition on the hard disk which is only accessible when I type in the root password, I want it to be accessible to the normal user when it logs in and mount it automatically. However when I go to terminal, switch to SU, open Thunar, go to the properties of the folder and make it resemble the types of folder properties say the My Documents folder has, it doesn't allow the normal user to access it still. I changed:

    groups to (my username)
    access : read write
    others : read write

    but one thing I notice is it remains Owner : Root?


    IS this last but causing the issue? I didn't intend on installation setting it to root but I recall I had issues working our how to use the gui installation, so I ended up mounting and adding at a later time after installation.

    What am I doing wrong here? Also it is in the directory of /run/media, is this an automatic mounting like the usb devices or is this a formal 'should be there' such as the original / root directory?

    Thanks in advance!

  2. #2
    Join Date
    Apr 2009
    Location
    central NY, USA
    Posts
    1,163

    Re: Setting permissions for folder access

    I'm likely incorrect but aren't the contents or /run/media temporary? If so, this may explain why your settings don't seem to 'stick'.
    Change - the only constant.

  3. #3
    Join Date
    Dec 2007
    Location
    Australia
    Posts
    1,891

    Re: Setting permissions for folder access

    There is a partition on the hard disk which is only accessible when I type in the root password, I want it to be accessible to the normal user when it logs in and mount it automatically.
    If you have an entry for the partition in /etc/fstab you can use the mount options to make it available to the user, e.g.:
    Code:
    /dev/sda4   /mounts/partition4        auto    user,rw,noauto,exec  0 0
    Note that I've created my own mount point /mounts.

    From man mount:
    Non-superuser mounts
    Normally, only the superuser can mount filesystems. However, when fstab contains the user option on
    a line, anybody can mount the corresponding filesystem.
    And ... you can use the UUID of the partition instead of the device name.
    Last edited by nsnbm; 3rd April 2018 at 05:51 AM.

  4. #4
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    ok well I have tried but it failed to work and i couldn't even get into the system startup, i ended up with an error message about having to log into emergency mode, luckily i was able to use nano to hastag out the new line, this is what I have now in my fstab which fails to work. The only thing I changed was the very bottom hastag line, I presume one of the options is inappropriate? The device itself is purely a data storage drive. I lookwed on help pages but not sure what the "1 1" bit is for on the label for the primary drive?

    #
    # /etc/fstab
    # Created by anaconda on Mon Aug 28 11:57:23 2017
    #
    # Accessible filesystems, by reference, are maintained under '/dev/disk'
    # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
    #
    UUID=ff86041e-61e1-4e48-a3ba-19ed7898252c / ext4 defaults
    1 1


    #2e56525-f4f5-42b0-ad7e-ab01dda710ea /dev/mnt/ ext4 auto,rw,exec,user,

  5. #5
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    Hi I change it to the following however I had the resulting error message

    #UUID=2e56525-f4f5-42b0-ad7e-ab01dda710ea /dev/mnt/ ext4

    Dependency failed for Mark the need to relabel after reboot.

  6. #6
    Join Date
    Dec 2007
    Location
    Australia
    Posts
    1,891

    Re: Setting permissions for folder access

    It's not entirely clear to me what you have done, but these suggestions come to mind:
    To find the UUID of the partition you want to mount you may need to boot up, mount the partition manually and then run, as root: blkid, or as an ordinary user just look in /dev/disk/by-uuid. That's the UUID you would use in the fstab file. In relation to a mount point, I would suggest creating a separate one which can be permanent, such as /mounts, and then mount to /mounts. You can call it anything you want of course, such as /partition4, but if it's separate and configured in fstab it should just mount at boot. /dev is the device directory, so is probably not a good mounting point. In relation to the mount options, you can use "defaults" and you will get a bunch of options which is outlined in the mount manual page which you can consider to see if those are the options you want. The two digits at the end of the fstab line just configure dumping and the order in which fsck are done ... 0 0 may be fine, and these can even be omitted in which case they default to 0 anyway. Ensure that you have at least the first 4 fields in the fstab entry, and if unsure, check the fstab man page.

  7. #7
    Join Date
    Jan 2015
    Location
    Al Ain, UAE
    Posts
    831

    Re: Setting permissions for folder access

    "#UUID=2e56525-f4f5-42b0-ad7e-ab01dda710ea /dev/mnt/ ext4"
    You are trying to mount something into /dev, which is not a real directory!

    First make a mount point:
    # mkdir /mnt/whatever

    Then edit /etc/fstab:
    UUID=2e56525-f4f5-42b0-ad7e-ab01dda710ea /mnt/whatever auto user,rw,noauto,exec 0 0
    --
    Have fun!
    http://www.aeronetworks.ca

  8. #8
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    Quote Originally Posted by flyingdutchman
    "#UUID=2e56525-f4f5-42b0-ad7e-ab01dda710ea /dev/mnt/ ext4"
    You are trying to mount something into /dev, which is not a real directory!

    First make a mount point:
    # mkdir /mnt/whatever

    Then edit /etc/fstab:
    UUID=2e56525-f4f5-42b0-ad7e-ab01dda710ea /mnt/whatever auto user,rw,noauto,exec 0 0
    Hi thanks for you response, I noticed the directory didnt exist and made it however I still got the same problem, I replaced my stuff after the filesystem with your "user,rw,noauto,exec 0 0" and it still didnt work, I think the problem is prior to mounting, there is an error during start up when it shows you the uuid , however I would like to copy the message but i cant see any startup log besides the most recent which is obviously no good because i had to correct the fstab file to get back into fedora. Its still talking about relable

  9. #9
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    isnt there a program that can do this with a GUI?

  10. #10
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    OMG I just tried to open up the Disk Management program under the /System part of the menu and it tells me there are no drives I am allowed to mount ?????

  11. #11
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    I just tried to open up the Disk Management program under the /System part of the menu and it tells me there are no drives I am allowed to mount ?????

    I have however managed to get it working now in the sense when i go into fedora i can mount it and be able to read a file on it without needing the root pw, however, I'd like it to automaticall mount it so its visible when I open Thunar, how do I do that?

    Thanks in advance,

  12. #12
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    Hi this is now fixed! I had to remove the "noauto" and replace it to "auto" for auto mounting. Thanks guys!

  13. #13
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    ok well for some reason I am back to being unable to see a folder by default, my fstab looks like this and i have created the folder /data


    UUID=291e84e8-f531-4439-b19d-6462d1b18f8b / ext4 defaults 1 1
    #UUID=22e56525-f4f5-42b0-ad7e-ab01dda710ea /data/ ext4 0 0

  14. #14
    Join Date
    Feb 2009
    Location
    Florida
    Posts
    650

    Re: Setting permissions for folder access

    Well.....
    If that's actually your fstab youv'e commented out the /data mount.

    I don't know your planned use, but I mount my personal bulk data drive in "/home/<userid>/data". It simplifies managing the access permissions for a single user.
    Last edited by Kobuck; 15th April 2018 at 04:41 PM.
    Laptop: Toshiba / Intel B960 2.20Ghz x2/ 4GB/ 320GB SataII/ Intel HD/ fc29.x86_64
    Tower: GigaByte (970A) / AMD FX 8320 3.5Ghz x8/ 16GB/ 9TB Sata III/ AMD 6770HD/ fc29.x86_64
    Bookshelf: Shuttle DS61 (H61)/ i3-3225 3.3Ghz x2/ 16GB/ 320GB Sata II/ Intel HD 4000/ fc29.x86_64
    Embedded: BeagleBone Blk / ARM AM3358 1 GHz x1/ 512MB/ 2GB eMMC/ PowerVR SGX530/ fc27.armv7hl

  15. #15
    Join Date
    Feb 2013
    Location
    England
    Posts
    374

    Re: Setting permissions for folder access

    I did the hash to get past bootup to get into fedora, the boot stops loading up owing to the mount not working. I dont think it can see the drive or had some error message to that effect. I dont understand why the bootup wont work when i have the same as i did on the previous install.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. [SOLVED]
    Samba: Access Denied / Folder Permissions
    By Gradientpixel in forum Servers & Networking
    Replies: 3
    Last Post: 16th October 2012, 03:41 AM
  2. Replies: 8
    Last Post: 12th November 2010, 01:08 AM
  3. Replies: 4
    Last Post: 17th February 2009, 01:07 AM
  4. Replies: 9
    Last Post: 28th January 2009, 05:38 AM
  5. Cannot Access Folder/User Permissions
    By urimind in forum Using Fedora
    Replies: 8
    Last Post: 17th September 2008, 04:45 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •