last day (14 days later) » 

07:58
3
Q: Adding permissions for udiskie-mount to policykit

Faheem MithaI'm using Debian jessie/stable (8.4). When I try to mount an external USB drive using udiskie-mount from inside a cron job, I get an error as follows below. Using udiskie-mount directly from the command line works fine. + udiskie-mount -o umask=0022 /dev/disk/by-uuid/4E1AEA7B1AEA6007 --verbose ...

Can I ask why a cron job? What about automounting requires scheduling?
@jasonwryan The mounting and unmounting happens in the context of a backup. First I mount the USB drive, do the backup, then unmount it.
Do you manually plug the drive in, or is it sitting there (unmounted) all the time?
It's plugged in the whole time. I don't think manually plugging in the drive is an option in the context of an automated, unattended process.
If it is plugged in all the time, why not just mount it from your backup script and dispense with udiskie all together?
07:58
I'm using udiskie-mount to mount it from my backup script. Regular mount doesn't work. It has that annoying issue with ntfs-3g that you might have run across.
no, I'm not familiar with it
I just thought it would be simpler to use cron to call the script, have the drive in fstab and mount it when required.
but you have it working now, so all good
@jasonwryan Yes, I'm using udiskie-mount to mount as required.
Regular mount gives the following error:
mount /tmp/foobar
Error opening '/dev/sde1': Permission denied
Failed to mount '/dev/sde1': Permission denied
Please check '/dev/sde1' and the ntfs-3g binary permissions,
and the mounting user ID. More explanation is provided at
tuxera.com/community/ntfs-3g-faq/#unprivileged
If one does a google search for this error, there are a lot of hits.
But most of the time, nobody seems to know what is causing it.
At one point, the ntfs-3gdriver had some problems. But my impression is that these have been resolved. I thought of asking about this on U&L, but haven't.
Is udiskie working well for you?
works great: I have used it for ages with no complaints (other than that one issue with the broken env)
And what is your use case for udiskie? Do you have it set to automount with that systemd file?
I don't have a DE, so it handles all my automounting
08:12
I mean, you run it as as a daemon using systemd?
what happens if you mount from fstab? same errors?
@jasonwryan udiskie does?
@jasonwryan I'm using fstab. The entry is as follows:
UUID="4E1AEA7B1AEA6007" /tmp/foobar  ntfs-3g    rw,user,noauto  0       0
I've tried a bunch of variations. I'm quite baffled.
Like I said, I thought of asking on U&L, but it would probably require a bunch of debugging. And most people here just want to answer and move on.
you want somethinglike:
UUID=01CD2ABB65E17DE0 /run/media/user1/Windows ntfs-3g uid=user1,gid=users,dmask=022,fmask=133 0 0
to set the correct perms
08:14
I've seen that exact same error all over the place. It's crossed my mind it might have something to do with the NTFS partition itself.
nope; it is windows fuckery with linux permissions
@jasonwryan I've tried things like that, but sure, I could try your recipe too. Just to be clear, I'm doing this as user.
With root, there are no issues.
you have to specify them
I can substitute my user for user1, correct?
well, to mount from fstab, you issue the command as root
08:15
@jasonwryan It should work as user, though.
Does it work with user for you?
My entire backup is run as user. I'm not a big fan of running things as root unless I absolutely need to.
@jasonwryan Thanks for the link.
the backup is run as user...
np
08:17
It definitely should be possible to mount as user. FAT32 can.
@jasonwryan So you mean, first mount as root, then backup as user?
@jasonwryan Ok, I guess that's an option, but I'd prefer to do the whole thing as user.
well, you can use sudo for the mount
Anyway. udiskie-mount is working. Though I don't know why it isn't suffering from the same ntfs error.
@jasonwryan How? That would have to be done interactively.
from the script
08:19
@jasonwryan Yes, but that would mean having the user password in the script.
that's what sudoers is for
@jasonwryan Hmm. You mean grant auth to that user to do mounting/unmounting?
@jasonwryan Ok, noted. Thanks for the suggestion.
that's what you are doing with the polkit file anyway
08:21
I wonder if it is worth asking about that ntfs thing on U&L. It's really quite annoying.
@jasonwryan Hmm. Yes, I see. Is it completely equivalent, then?
did you try the line form the arch wiki: it should work fine
@jasonwryan Which line is that?
the ntfs line with the user and group ids
I pasted abpve
You mean:
9 mins ago, by jasonwryan
UUID=01CD2ABB65E17DE0 /run/media/user1/Windows ntfs-3g uid=user1,gid=users,dmask=022,fmask=133 0 0
? I thought you said this still needs root to mount.
it needs root to run mount -a BUT it mounts the drive as your user
08:24
@jasonwryan Ah, ok. Yes, that bit I can do with no problem. It's just the mounting as user bit that doesn't work.
Though, like I said, it works with FAT32 for example.
BTW, I like your answer:
48
A: Should I stop referring Kali users to U&L from AU?

jasonwryanThey are, sadly, more appropriate here, seeing the distro is based on a Linux kernel. In order to minimise the impact on those of us who have little patience for the numbats that think that installing Kali will make them l337 haXX0r5, please—as a public service— ensure that they are all tagged k...

@jasonwryan ?
I've also thought that the Kali people could benefit for their own site. Someone should really propose it.
all questions, no answers...
08:26
Maybe someone has, and we don't know about it.
well, its not somewhere I'd want to visit
@jasonwryan Pardon? I don't follow. You mean the Kali people?
Ok. So, what is TIAS?
try it and see
it will work
08:27
" their adolescent ardour for penetration is finally able to be appreciated by the audience it deserves." <- nice double entendre.
@jasonwryan As user, you mean? Ok, I'll try it.
I have my moments :)
no: put it in your fstab and then mount -a
Ok, thanks for the help and advice.
np
I'll delete my comments on your question: they don't add anything
08:29
@jasonwryan but as root, right?
ttyl
TIAS :)
@jasonwryan Whatever you want to do.
I see the AU people don't want them either. Personally, I'd be quite happy if they went to AU.
They'd actually fit in well with all the prevailing cluelessness there.
Well, there's this one now:
75
CodeBreakers/CodeHackers/HackOverflow

Proposed Q&A site for pure open-source code hackers interested in manipulating existing code structures towards a different end and make them do things they were never intended to do. Hacking&protecting the assets is off-topic, so ask your question carefully.

Currently in definition.

Maybe we could send them there instead.
Though this proposal doesn't seem to be going anywhere.

last day (14 days later) »