Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: how to add acl option to fstab

  1. #1
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    177
    Distro
    Lubuntu 12.04 Precise Pangolin

    Exclamation errors adding acl option to fstab

    Hello,

    I'm using ubuntu since a few months so I'm sorry if my question
    would sound easy to the majority but I cannot solve it by myself.


    I've got a partition, let's say sdb6, which is one of the partitions of my second hard disk.
    On boot ubuntu only mount my boot partition, let's say sda2, which is on my first drive.
    Once ubuntu started if I want to mount a partition I usually click on it under the Places menu and an authorization is required.

    As I would like to add acl to a partition following this thread

    I've tried to add acl option to my fstab, but my /etc/fstab doesn't have
    any info of any of my partitions and it originaly looks like:

    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' 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 defaults 0 0
    # / was on /dev/sda2 during installation
    UUID=01c0de92-a506-4615-9280-cd13e8803cd2 / reiserfs notail 0 1
    # swap was on /dev/sdb1 during installation
    UUID=fa236bc3-f8c7-432d-8418-db03b06ec3d8 none swap sw 0 0
    /dev/scd1 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
    /dev/fd0 /media/floppy0 auto rw,user,defaultsnoauto,exec,utf8 0 0
    so I tried to add a new line for my partition as:
    Code:
    /dev/sdb6    /media/data    ext3    defaults,acl    0    1
    but when I click on it under the places menu it shows an error window saying:
    Error mounting: mount exited with exit code 1: helper failed with:
    mount: only root can mount /dev/sdb6 on /media/data
    I tried to specify other options rather then defaults as explained here

    but nothing changed.


    So if I mount it through terminal follow:
    Code:
    sudo mkdir /media/data
    sudo mount -t ext3 /dev/sdb6 /media/data
    everything is fine and the partition is mounted but if I try to unmount it by right-clicking
    on its desktop icon and selecting unmount it again shows me a similar error

    Error unmounting: umount exited with exit code 1: helper failed with:
    umount: only root can unmount /dev/sdb6 from /media/data
    and on a similar way if I unmount it through a terminal by typing

    Code:
    sudo umount /media/data
    sudo rm -r /media/data
    evrything is ok.

    However acl support seems not to be loaded neither in this way because if I open a file on it with eiciel it gives me an error (of course when the partition is mounted with the previous code)
    Could not open the file "/media/dati/test" (Operation not supported)
    while if I type on a terminal

    Code:
    sudo mount -o remount,acl /media/data
    acl is loaded and eiciel can open any file and folder on it.

    My goal is to mount/unmount any partition with acl loaded and graphically
    but I reached my limit on my linux knoweledge.

    Could any guru out there help me please?
    Thanks in advance
    Last edited by tanoloco; February 23rd, 2010 at 11:38 AM.

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: how to add acl option to fstab

    Have a look at this site, which is actually for debian, but may also be OK for Ubuntu.
    http://www.debianhelp.co.uk/acl.htm

  3. #3
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    177
    Distro
    Lubuntu 12.04 Precise Pangolin

    Re: how to add acl option to fstab

    hi,

    thanks for your suggestion but it didn't work.
    I had a look to a lot of guides without luck.

    I tried pysdm to try to write fstab correctly but it works fine only through its gui:
    it requires an aauthorization whle start-up and then it has a workin mount/unmount buttom
    and acl is activated too, but when you write all the modifications to fstab by pressing the apply button and try to mount from the places menu the old error mounting advice show up.

    I tried googling but no solution at th moment.

    BTW the string I used on my fstab following your suggestion was

    Code:
    /dev/sdb6   /media/dati     ext3   {{acl}},defaults,errors=remount-ro  0  1

  4. #4
    Join Date
    Dec 2009
    Location
    Panama City, FL, USA
    Beans
    543
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: how to add acl option to fstab

    I have a line in my fstab almost identical to the first one you tried and it works fine, but it's a partition I want mounted at boot (it's on my boot hard drive so it's always there). The only other difference is I used the UUID of the partition instead of the device to identify it.

    Assuming what you want is to be able to mount the device by right-clicking it and have the ACL option work here are my recommendations:

    1) Use the first line you posted, changing /dev/sdb6 to the UUID of /dev/sdb6 (you can find it out with "sudo blkid")
    2) Change the options from "default,acl" to "acl,user,noauto,errors=remount-ro"

    That should do what you want.

  5. #5
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    177
    Distro
    Lubuntu 12.04 Precise Pangolin

    Re: how to add acl option to fstab

    I found a partial workaround:

    1. fstab was changed adding the following
    Code:
    /dev/sdb6  /media/data     ext3    user,noauto,acl  0  0
    2. I created a mounting point under media
    Code:
    sudo mkdir /media/data
    which on my desktop comes with 750 permission while media folder as 755 permission

    Now clicking under the places menu will produce to mount the partition with acl activated but some problems still remain:


    a. the authorization is no longer required as before: the user can mount and unmount the partition freely. If I change in fstab the user option in nouser I will get the hated
    Error mounting: mount exited with exit code 1: helper failed with:
    mount: only root can mount /dev/sdb6 on /media/data
    b. the mounting point (the data folder in my case on /media) will no longer be deleted.
    If I cancel by myself (when unmounted) with
    Code:
    sudo rm -r /media/data
    When next trying to mount it always by clicking on the menu places I receive an error

    Error mounting: mount exited with exit code 1: helper failed with:
    mount: mount point /media/dati does not exist
    c. if a different user mount this partition then other users cannot unmount it receiving an error
    Error unmounting: umount exited with exit code 1: helper failed with:
    umount: only other_user can unmount /dev/sdb6 from /media/data
    even if the other user close his session and the only way to unmount it is by terminal
    Code:
    sudo umount /media/data

    I would like to have anything as before (default behavior of ubuntu), which is the ability to mount a partition through the menu places and unmount it by right-click on its desktop icon and it asks me an authorization to mount while any user can unmount it with the same authorization.

    All this working default behavior only with acl activated.

    I didn't thought it was so complicated ...
    Last edited by tanoloco; February 23rd, 2010 at 05:03 PM.

  6. #6
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    177
    Distro
    Lubuntu 12.04 Precise Pangolin

    Re: how to add acl option to fstab

    hi adam814 thanks for your reply,

    I tried your suggestion by adding

    Code:
    UUID=580214b3-c7b1-4d3e-bc91-acb1c08d4793    /media/data    ext3    acl,user,noauto,errors=remount-ro    0    1
    to my fstab and the behavior is the same as described with my previous post.

    Anyhow this is a good compromise but I was wondering if it was possible the have the default behavior with acl activated.

    Thanks again for your support

  7. #7
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: how to add acl option to fstab

    Change the option in fstab from user to users

    How to fstab - Ubuntu Forums
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  8. #8
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    177
    Distro
    Lubuntu 12.04 Precise Pangolin

    Lightbulb Re: how to add acl option to fstab

    Hi bodhi.zazen and thank you for your help,

    your suggestion solved my third problem in the list of my previous post which was the prohibition to unmount a device mounted by another user.

    Talking about this I made some test I want to share with you: in my experience the fstab option *users* will allow to mount/unmount this device not only the users within the group users but any user!
    In fact I created an unpriviliged user and left him standalone without adding it to any group and he can mount this device which could be unmounted by other users included in the group users and viceversa it can unmount the same device mounted by those users.

    Anyhow always remain the first two problems:
    1. The authentication to mount the device is no longer required
    2. It's needed to have a mounting point under the media folder to mount which will not be deleted after be unmounted.

    While the default behavior of ubuntu is to require an authentication to mount not-removable devices and to create/delete the mounting point under the media folder by itself. (I'm talking about mounting a device through he menu places and unmounting it by right-clicking on its desktop icon)

    I read a lot of guides but I cannot see a solution to fix this behavior all my tests end with the errors reported on my previous post.

    I had a look at your link too but I haven't found anything about that or am I wrong?

    I was thinking that maybe the mount command called by clicking under the menu places could be configure out in order to always activate acl for example changing it in

    mount -o acl
    or
    mount -o remount,acl


    is there an easy way to do so?
    Maybe there is a conf text somewhere to specify some option for this command

    That problably would leave any behavior as is plus would activate acl anytime a device would be mounted ...


    Any suggestion?
    Last edited by tanoloco; February 24th, 2010 at 12:30 PM.

  9. #9
    Join Date
    Apr 2006
    Location
    Montana
    Beans
    Hidden!
    Distro
    Kubuntu Development Release

    Re: how to add acl option to fstab

    To make a directory, use mkdir

    Code:
    sudo mkdir /media/foo
    In terms of users mounting a partition, the option user allows a user to mount the partition, users allows all users, if you need finer grain of control take away both options and configure sudo.

    The problem you are having is that there are two ways of mounting a partition. One is via fstab and the other is via gnome or more specifically nautilus.

    If there is an entry in fstab it overrides the gnome settings.

    I really do not understand what you are wanting. Some users can mount the partition, but not others ? use sudo.

    Sometimes you want it mounted with acl and sometimes not ? what then is the point of using acl ?

    In terms of setting options, fstab is IMO easiest. If you are trying to configure how gnome mounts partitions you are going to start digging into gnome, the config files, and HAL.

    http://linux.die.net/man/1/gnome-mount

    http://webcvs.freedesktop.org/hal/ha...storage-policy

    Sorry, but I am not familiar enough with the specific details to know if you can configure the behavior per user.

    Personally I would use fstab and sudo.

    http://www.gratisoft.us/sudo/man/sudoers.html

    See the sections on allowing some users to run some commands. Perhaps you want some users to mount, but not unmount ?
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface

  10. #10
    Join Date
    Feb 2010
    Location
    Italy
    Beans
    177
    Distro
    Lubuntu 12.04 Precise Pangolin

    Angry Re: how to add acl option to fstab

    Hi bodhi.zazen sorry if I haven't replied to you sooner but I was deep inside another problem to solve (see another post from me asking for encfs).

    Sorry if I confused you somehow: maybe I've been too prolix or maybe I'm confusing because I'm a newbie and I have my ideas not so clear

    My scenario is to boot from a partition with no other devices mounted.
    Normally if I want to mount a partition on a not-removable device, such as a second hard disk, I use the Places menu and click on that partition and ubuntu ask me for an authorization to mount it.
    On the same way if I want to unmount it I right-click on its desktop-icon and select unmount.
    No folder is required on media folder to mount and no folder remains after having unmonted it.


    Now: what I want to do is to add acl support everytime this partition is mounted by any user without changing the behavior described now.

    I thought to add acl option in fstab and I finally used (thanks to the help of the forum)
    Code:
    UUID=580214b3-c7b1-4d3e-bc91-acb1c08d4793    /media/data    ext3    acl,users,noauto,errors=remount-ro    0    1
    but this changes the behavior of ubuntu as described in my previous post in a way that:
    1. The authentication to mount the partition is no longer required
    2. I need to create a folder as a mounting point under the media folder which will not be deleted after be unmounted.

    So again: how do I add acl support to a partition everytime is mounted by anyone without changing the default behavior of ubuntu? Or how do I fix those changed behaviors after having added that string to my fstab?

    Hope I've been more clear

    PD: I will have a look to the links you povided me but at first look they don't seem to help me ...

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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