You are not logged in.
If I add
allowed_internal_devices_vfat = /dev/sda1
to /etc/udevil/udevil.conf would it be ok to mount it with the read only command I posted at Xcfe startup?:
udevil mount -o ro /dev/sda1
I definitely want it to be read only because I know what can happen if you write to the Windows partition from a Linux system.
If you add that to udevil.conf, then any user able to run udevil will be able to mount and unmount that partition with any allowed options. This includes unmounting and remounting it rw. So from a security perspective, the ro would not be strictly enforced, but would probably require human intervention to remount rw (this would be considered poor protection for any system drive, even of another OS). From a mere safety perspective, mounting it ro that way is probably good enough.
Normally, to do what you're trying to do, it would be more appropriate to not use udevil, and instead add a line like this to /etc/fstab - then you won't need udevil to mount it, and you will be able to enforce the ro:
/dev/sda1 /mnt/sda1 vfat user,ro,noauto 0 1
You will also need to create the mount point once as root:
sudo mkdir /mnt/sda1
Then your user can mount it with:
mount /dev/sda1
Or if you always want it mounted, just remove the 'noauto' option from the fstab line so it will be mounted at boot (or with mount -a).
Offline
Also, it looks like your partition is ntfs, not vfat? In that case, you'll want to use type 'ntfs' or 'ntfs-3g' (last I knew ntfs was read-only on Linux, while ntfs-3g was rw).
Offline
Ohai,
i'm using udevil for quite a long time and love it. There's only one problem; i need to mount shitty smb-shares.
$ udevil mount smb://flexo@foobar.com
Works fine for me, but if i suspend my laptop the mountpoints get unresponsible. If i try to access a mounted smb-dir in /media (my default mountpoint for udevil) commands aren't terminating (ls runs forever). Is there a known bug or can i configure the smbfs-mount to act like gvfs (is working after a suspend).
Thanks,
Best flexo
Fight war not wars, destroy power not people!
Offline
if i suspend my laptop the mountpoints get unresponsible. If i try to access a mounted smb-dir in /media (my default mountpoint for udevil) commands aren't terminating (ls runs forever).
I think that's fairly typical behavior for cifs/smbfs, eg here and here.
You might try adding an unmount command to the suspend sequence, and a mount command to the resume sequence. I don't have specifics on how to do so, and it will vary with system setup, but some discussion is here.
Offline
Also, it looks like your partition is ntfs, not vfat? In that case, you'll want to use type 'ntfs' or 'ntfs-3g' (last I knew ntfs was read-only on Linux, while ntfs-3g was rw).
I have ntfs-3g installed and think I'll leave mounting the windows partition with sudo when I need it which is very seldom any way.
Love the way udevil mounts my USB drive and also love the way Arch asks for a password to mount any other internal partitions. It's a shame other distros or the ones I've seen don't do the same.
Thanks for your efforts.
Offline
How can I use custom key in SSH? I tried the following commands but no success.
$ udevil --verbose mount ssh://archlinuxarm -o IdentityFile=/home/ren/.ssh/raspberrypib_rsa
udevil: denied 90: option 'IdentityFile=/home/ren/.ssh/raspberrypib_rsa' is not an allowed option
$ udevil --verbose mount ssh://archlinuxarm IdentityFile=/home/ren/.ssh/raspberrypib_rsa
udevil: error 69: cannot canonicalize mount point path
$ udevil --verbose mount -o IdentityFile=/home/ren/.ssh/raspberrypib_rsa ssh://archlinuxarm
udevil: denied 90: option 'IdentityFile=/home/ren/.ssh/raspberrypib_rsa' is not an allowed option
$ udevil --verbose mount IdentityFile=/home/ren/.ssh/raspberrypib_rsa ssh://archlinuxarm
udevil: error 40: cannot stat IdentityFile=/home/ren/.ssh/raspberrypib_rsa: No such file or directory
This command is fine though.
$ sudo /bin/mount -v -t fuse -o nosuid,noexec,nodev,noatime,uid=1000,gid=100,nonempty,allow_other,IdentityFile=/home/ren/.ssh/raspberrypib_rsa sshfs#ren@archlinuxarm:/home/ren test
How can I do this in udevil?
Offline
How can I use custom key in SSH? I tried the following commands but no success.
$ udevil --verbose mount ssh://archlinuxarm -o IdentityFile=/home/ren/.ssh/raspberrypib_rsa udevil: denied 90: option 'IdentityFile=/home/ren/.ssh/raspberrypib_rsa' is not an allowed option
If you want to use the IdentityFile option with ssh, you'll need it to add it to the allowed options in /etc/udevil/udevil.conf. For example, replace the allowed_options_sshfs line with:
allowed_options_sshfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, idmap=user, BatchMode=yes, port=* IdentityFile=/home/ren/.ssh/raspberrypib_rsa
It should be noted that udevil performs all mounts as root. So mounting ssh via udevil is comparable to adding a line to fstab for the mount. There may be an sshfs option to control what user the mount is for (see ssh fstab examples for the options they use). If you use a key for the root user, as you're doing above, it should probably be stored in /root/.ssh/ for better security. Otherwise you have root using a key file that is stored with normal user permissions.
The other option is to run sshfs directly as your 'ren' user to do the fuse mount, without using udevil or mount. As it's a fuse filesystem, you don't really need udevil to mount sshfs. If running sshfs directly, it should find the key in /home/ren/.ssh. See 'man sshfs'.
Offline
Thank you!
I was finally able to automount my 1TB USB drive at boot with this simple command added to Session and Startup in Xcfe:
udevil mount /dev/sdb1
This was after I installed udevil. I like the name lol!
The name of the drive was listed as /run/media/cavsfan/Fantom when I manually mounted it but now it is just /media/Fantom/.I have a conky that shows the ram, the partition that Ach is installed on and the Fantom drive and their usage but I could not get it to automount until now.
It looks beautiful now.
For some odd reason I cannot get write access to my USB drive any more.
I tried yesterday to save a text file to it and it said I did not have permission.
I've tried udevil mount -o rw,noatime /dev/sdb1 and udevil mount -o rw /dev/sdb1 but neither give read/write permission.
I can only read from it now. I don't recall if I've ever copied anything to it from Arch before or not come to think about it. I think I did just not sure.
But I desperatly need to be able to write to that USB drive from Arch. I can even sudo mount it and still no write capability.
Offline
What format is the drive? NTFS I suppose?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
What format is the drive? NTFS I suppose?
Yes it is ntfs. I had ntfs-3g installed but just noticed that it is not installed so I re-installed it.
I wonder if ntfs-3g-fuse from the AUR might also help?
Possibly just a reboot would fix this after I reinstalled ntfs-3g?
Every file on the USB drive is read-only with a lock on the file names.
I don't want to edit /etc/fstab to accomplish this.
Offline
Never mind. Stupid question all was well after a reboot.
I'm stunned that I removed ntfs-3g. I don't recall doing that but I had to.
C'est la vie
Offline
Does anyone know how to fix this problem
nishant@arch ~ % udevil mount smb://192.168.2.1
udevil: denied 73: fstype 'cifs' is not an allowed type
Thanks, Nishant
Offline
Does anyone know how to fix this problem
nishant@arch ~ % udevil mount smb://192.168.2.1 udevil: denied 73: fstype 'cifs' is not an allowed type
Thanks, Nishant
Have you looked at the 'allowed_types' directive in /etc/udevil/udevil.conf?
Offline