Re Ubuntu autofs rule hides my home directory so I cannot login (TomH)

Tom H tomh0665 at gmail.com
Mon May 30 18:02:03 UTC 2016


On Mon, May 30, 2016 at 4:41 PM, Frank Chang <frankchang91 at gmail.com> wrote:


> Thank you for your excellent answer just now. Our architect and I would
> like to solve the following problem. May I ask if you could look into this
> problem briefly?

I don't have the time at the moment to test this but just looking at the setup:


> When I use a udev rule ACTION=="add" and RUN+="/bin/ln -sf /media/autousb/%k
> /media/frank/usb/%k" shown immediately below:
>
> ACTION=="add", KERNEL=="sd*", ENV{DEVTYPE}=="partition", \
> ENV{ID_BUS}=="usb", \
> SYMLINK+="usbdisks/%k", MODE:="0660", \
> RUN+="/bin/rm /media/usb/%k", \
> RUN+="/bin/ln -sf /media/autousb/%k /media/frank/usb/%k"

The first "RUN" removes a symlink that you never create because you've
added "frank" to the path in the second "RUN".

You cannot set "MODE" for a symlink; it's always going to be "0777".


> the udev or autofs service creates the directory /media/autousb with 755
> permission rather than 777 permission so that udev or autofs cannot create
> regular files or soft links inside /media/autousb.

It's autofs that creates "/media/autousb/".

755 must be the result of root's umask (022) but this
shouldn't/mustn't be  a problem.




More information about the ubuntu-users mailing list