Autofs mounting

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Autofs mounting

Koenraad Lelong
Hi,

I'm trying to give a daemon access to a USB-drive. Manually as root it
works fine, but the daemon does not run as root, so the daemon has no
rw-access to the drive. I googled and tried some of the suggestions,
with no luck.
What I did :
My auto.master :
+auto.master
/mnt/vchanger      /etc/auto.vchanger        --timeout=30

My auto.vchanger, working OK as root :
# /etc/auto.vchanger
*          -fstype=auto,rw       :/dev/disk/by-uuid/&

I tried this in auto.vchanger :
*     -fstype=auto,rw,uid=bacula       :/dev/disk/by-uuid/&
*     -fstype=auto,rw,gid=bacula       :/dev/disk/by-uuid/&
*     -fstype=auto,rw,uid=$UID         :/dev/disk/by-uuid/&
*     -fstype=auto,rw,gid=$GID         :/dev/disk/by-uuid/&
*     -fstype=auto,rw,gid=users        :/dev/disk/by-uuid/&

I always get an error when trying to access the drive (as root or
myself, user bacula has no shell) :
error: unrecognized mount option "gid=0" or missing value
"gid=0" can be replaced with "uid=107", or "gid=110", depending on the
auto.vchanger content. Those uid's and gid's do exist.
After changes to auto.vcahnger, I restarted autofs (rcautofs restart).

Anyone who can help me ?
I'm working with OS 11.4, 32bit.

Thanks,

Koenraad Lelong.
--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Autofs mounting

Philipp Thomas
* Koenraad Lelong ([hidden email]) [20110418 17:00]:
> Hi,
>
> I'm trying to give a daemon access to a USB-drive.

What file system is on the thumb drives? uid= and gid= mount option are only
valid for fat and ntfs partitions.

Philipp
--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Autofs mounting

Koenraad Lelong
Op 18-04-11 20:13, Philipp Thomas schreef:
> * Koenraad Lelong ([hidden email]) [20110418 17:00]:
>> Hi,
>>
>> I'm trying to give a daemon access to a USB-drive.
>
> What file system is on the thumb drives? uid= and gid= mount option are only
> valid for fat and ntfs partitions.
>
> Philipp

Hi Philipp,

I formatted the RDX-cartridges with ext3 or ext4.
I really do have a permission problem. When I try to access the drive as
root, the drive mounts OK. Then when I chmod the mount-point to 777, the
bacula-user has no problems accessing the drive. The mount-point is
/mnt/vchanger/xxx where xxx is the drive's UUID.


Koenraad.
--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Autofs mounting

Philipp Thomas
* Koenraad Lelong ([hidden email]) [20110419 09:32]:

> I formatted the RDX-cartridges with ext3 or ext4.

Then there is no mount option to change the owner, i.e. the owner of the
backup client can only access files and directories whose access rights
allow it.

Philipp
--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Autofs mounting

Carl Spitzer-4
In reply to this post by Philipp Thomas
I just had automounting go out on an old system under 10.0.  No reason
it just did.
I consulted the oldtimer of our local group and he found a method in
fstab to fix it.

usbfs                /proc/bus/usb        usbfs      noauto,mode=0660 0
0 0

the key fix was the mode=0660 0 part of the line and the auto mount now
works in all users.

CWSIV


--
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]