maindavfs2 - Support: sr #110191, autofs failing with invalid option...

 
 

sr #110191: autofs failing with invalid option -- 'n'

Submitter:  Massimo <massimo_b>
Submitted:  Tue 04 Feb 2020 08:51:03 AM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  _71007
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sun 26 Apr 2020 09:05:00 AM UTC, comment #8: 

I don't use autofs. But I think

  • autofs should allow to define a different mountpoint for every user and every davfs2 file system.
  • autofs should allow to define for every user different options with the -o option as you can find in the manual of mount.davfs.
  • davfs2 allows to have different options in /etc/davfs2(davfs2.conf for every mountpoint.


By the way: with the Linux kernel every mount is done with root privileges. But when mounting is done by root then the daemon mount.davfs will run as user davfs2, group davfs2. And the owner of the file system can be any valid user as defined with mount option uid.

Werner

- <_71007>
Fri 24 Apr 2020 07:20:29 AM UTC, comment #7: 

comment #6:

> You should use the /etc/fstab file for this. I don't know whether autofs reads this file, but I think so.
> Werner


Using fstab does not answer the question. autofs does not use fstab. When doing the fstab approach without autofs, then every user doing the mount can have its davfs2.conf in $HOME. Doing it by autofs, then all the mounts are done with root privileges and there is no way to have user specific options.

Massimo <massimo_b>
Wed 18 Mar 2020 11:13:41 AM UTC, comment #6: 

You should use the /etc/fstab file for this. I don't know whether autofs reads this file, but I think so.
Werner

- <_71007>
Thu 05 Mar 2020 10:34:04 AM UTC, comment #5: 

With the provided patch in CVS it works with autofs.

However what does not work with autofs is mounting as user.
Before I was only using ~/.davfs2/ for davfs2.conf and secrets, doing the mount.davfs as user.

Now autofs does the mount as root and does not use the users $HOME.
So I'm using /etc/davfs2 now for conf and secrets. But the thing is, every user has it's own DAV user and I would like that every user is only able to mount its DAV to its $HOME/mnt/dav.
Can this be achieved with autofs?

Massimo <massimo_b>
Mon 17 Feb 2020 03:42:15 PM UTC, comment #4: 

Thanks for fixing.

As for autofs I'm a bit lost where to file a bug report for that. It that a bug for kernel.org? I did not find a homepage for the autofs user tools.
systemd can also use autofs, but can also use the fstab option "automount" which seems to be a different way to automount. If you say mount and systemd have solved that issue and also autofs is left with this issue, I guess you don't mean systemd using autofs.

Massimo <massimo_b>
Sat 08 Feb 2020 09:53:39 AM UTC, comment #3: 

The issue is fixed in the CVS-sources.

By the way:
autofs must not set option -n only because /etc/mtab is a symlink. This issue has been resolved by mount some years ago with file /run/mount/utab. So autofs should remove this code.
There was a similar problem with systemd which meanwhile removed this option.

Werner

- <_71007>
Wed 05 Feb 2020 06:32:51 AM UTC, comment #2: 
Massimo <massimo_b>
Wed 05 Feb 2020 06:22:11 AM UTC, comment #1: 

I learned that davfs2 does check if mtab is a symlink and act accordingly without the "-n" flag, so it should just ignore it.

Massimo <massimo_b>
Tue 04 Feb 2020 08:51:03 AM UTC, original submission:  

I tried mounting with autofs:


# grep dav /etc/autofs/auto.master /etc/autofs/auto.davfs
/etc/autofs/auto.master:/mnt/davfs  /etc/autofs/auto.davfs --timeout=60 --ghost
/etc/autofs/auto.davfs:hidrive         -fstype=davfs,rw   :https\://webdav.hidrive.ionos.com/

$ grep sec $HOME/.davfs2/davfs2.conf
secrets         ~/.davfs2/sec

$ cat $HOME/.davfs2/sec
"https://webdav.hidrive.ionos.com/" "foobar"   "foo123"


Syslog:

[automount] pidinfo requestor: pid:10847 comm:ls tgid:10847 uid:4728 euid:4728 gid:4728 egid:4728
[automount] pidinfo parent: pid:6301 comm:bash tgid:6301 uid:4728 euid:4728 gid:4728 egid:4728
[automount] attempting to mount entry /mnt/davfs/hidrive
[automount] mount(generic): calling mount -t davfs -o rw https://webdav.hidrive.ionos.com/ /mnt/davfs/hidrive
[automount] >> /sbin/mount.davfs: invalid option -- 'n'
[automount] mount(generic): failed to mount https://webdav.hidrive.ionos.com/ (type davfs) on /mnt/davfs/hidrive
[automount] failed to mount /mnt/davfs/hidrive


Massimo <massimo_b>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by _71007 (Posted a comment)
  • -email is unavailable- added by massimo_b (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-02-08 _71007 StatusNone Done
        Assigned toNone _71007

    Back to the top

    Powered by Savane 3.14-8eb0.
    Corresponding source code