You are not logged in.

#1 2019-08-12 21:05:43

tdlam
Member
Registered: 2015-10-02
Posts: 12

Need global solution for permission denied error for external drives

So I have an issue that I believe has been covered many times before but I have a slight twist to add.
Basically it is that with Bunsenlabs and other Debian based distros I can’t copy to and from external drives without getting a “permission denied” error.
Now the wrinkle for me is that I create full install images which I deploy on older computers that my ministry freely gives out to the poor for their use.
I am attracted to Bunsenlabs (and MX Linux as another example) because the Debian base is very stable and we are not having to redo the images after a month or so to keep up with the updates as it is very time consuming to deploy an Ubuntu based image and have 300 updates per computer because the image is two months old.
What I need is a solution that will allow any user to copy and paste to external drives without permission denied errors. Sure there are tutorials on how to add to fstab a line of code that allows a specific external drive to be mounted to be copied to but as you can see there is no way to know what kind of drives folks we give computers to would have.
I never seem to have this issue with any Ubuntu based distros (Xubuntu 18.04 as an example which is what we are currently using for our charity computers) and was wondering if any of you good folks would have a suggestion or solution(s)? How does Ubuntu avoid this issue as a start maybe?

As an aside your distro is great! It brought new life to a donated ASUS Eeepc with 1 gig of ram and an atom processor and if I can get this solved Bunsenlabs will be one of our ministry's go to distros for our older spec machines.
Thank you all in advance and God bless you.


there are three kinds of people in the world...those that can count and those that can't

Offline

#2 2019-08-12 21:32:25

twoion
ほやほや
Registered: 2015-08-10
Posts: 2,555

Re: Need global solution for permission denied error for external drives

tdlam wrote:

What I need is a solution that will allow any user to copy and paste to external drives without permission denied errors. Sure there are tutorials on how to add to fstab a line of code that allows a specific external drive to be mounted to be copied to but as you can see there is no way to know what kind of drives folks we give computers to would have.

I can't speak for the current (but old-ish) Helium release but our private beta builds of the upcoming Lithium release do handle this flawlessly (had the pleasure of recovering my brother's Windows PC's data with it).

Perhaps somebody who uses BL or Debian as their main OS could chime in.


At the end of the river the sundown beams

Offline

#3 2019-08-13 06:18:49

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,102
Website

Re: Need global solution for permission denied error for external drives

When I've hit permissions errors is when mounting a drive which is already formatted in eg ext4 and directories in the file system are owned by root, which is what usually happens when using gparted. Ext4, unlike vfat, will have owners and permissions set and the computer will respect them.

Previous post: https://forums.bunsenlabs.org/viewtopic … 816#p78816

@tdlam for users to have read/write access they need a directory on the removable drive owned by them (previously created by root), or else to invoke root when accessing the drive, or else not to use ext4-formatted drives. I don't think there's any workaround, beyond a custom fstab entry.

Last edited by johnraff (2019-08-14 03:07:34)


John
--------------------
( a boring Japan blog, idle Twitterings and GitStuff )
In case you forget, the rules.

Offline

#4 2019-08-13 12:31:19

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,937
Website

Re: Need global solution for permission denied error for external drives

Maybe pmount (also in Buster repos).
https://help.ubuntu.com/community/Mount … ing_pmount

edit: Staring at my ob autostart I have nothing there and automounting is working fine with thunar (Buster).

Last edited by brontosaurusrex (2019-08-13 14:55:01)

Offline

#5 2019-08-13 12:37:45

clusterF
Member
Registered: 2019-05-07
Posts: 330

Re: Need global solution for permission denied error for external drives

^ along the same line of thought, possibly spacefm file manager and udevil for mounting. Also a good point about udevil is you can have devmon daemon autostart and any drives you plug in get automounted which would make the mount process easier for novices. Ive been using it for ages and so far i have had no issues with read and write on various external usbs and drives, so long as the formats are catered for in the system.

Last edited by clusterF (2019-08-13 12:50:59)


"Common sense is like deodorant, those who need it the most never use it."

git: clusterF

Offline

#6 2019-08-13 12:58:30

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,126

Re: Need global solution for permission denied error for external drives

How does Ubuntu avoid this issue as a start maybe?

but our private beta builds of the upcoming Lithium release do handle this flawlessly

Wouldn't that be a new udev rule that's been added to Debian/Ubuntu that wasn't available for Helium? Might be able to drop that in for Helium.

Last edited by PackRat (2019-08-13 12:58:47)


You must unlearn what you have learned.
    -- yoda

Offline

#7 2019-08-14 03:08:48

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,102
Website

Re: Need global solution for permission denied error for external drives

^Can udev overrule the existing permissions on an ext4 drive?


John
--------------------
( a boring Japan blog, idle Twitterings and GitStuff )
In case you forget, the rules.

Offline

#8 2019-08-14 13:21:28

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,126

Re: Need global solution for permission denied error for external drives

johnraff wrote:

^Can udev overrule the existing permissions on an ext4 drive?

I don't know; that was just the first thing that came to mind. If Ubuntu, Xubuntu, and Lithium builds can accomplish this, they must have some service going on under the hood that Helium does not. I don't know if that would be controlled  by udev or systemd.

Easy way to check might be to compare your Lithium builds (or an Ubuntu live session) against Helium and see what's been added.

Last edited by PackRat (2019-08-14 13:27:18)


You must unlearn what you have learned.
    -- yoda

Offline

#9 2019-08-14 16:12:22

tdlam
Member
Registered: 2015-10-02
Posts: 12

Re: Need global solution for permission denied error for external drives

Well thanks for your suggestions guys
@johnraff yes I know about needing a directory to be owned by the user on removable drives in order to access it, but as I stated this is a killer for the clientele that we give our charity computers to since they are really very computer illiterate and would not even know nor understand even if shown how to do this. (even though for you or even me this is easily undertsood)

@ clusterF I will try to get udevil working with spacefm. I have checked out spacefm and its very nice and very feature rich...maybe almost too much so for our charity folks because if the press a wrong button they may change the spacefm configuration and that will be a killer for them as well. Do you know if udevil and devmon works with thunar or say pcmanfm?

I'm sorry but even though I consider myself to be pretty literate with Linux I am not able to check udev rules or compare builds. Its above my level of expertise.
Currently what I am trying though, is I experimenting with devmon call options to see if they give me any results regarding the permission issue.
But at the least if I can make a request of you good developer folks...if you can please figure this issue out and include a fix for your current or next distro that would be great. Forgive me if I'm asking too much as I do have great respect for your efforts and how readily accessible you all are for any issues. You are doing the world a great service.


there are three kinds of people in the world...those that can count and those that can't

Offline

#10 2019-08-14 17:01:31

tdlam
Member
Registered: 2015-10-02
Posts: 12

Re: Need global solution for permission denied error for external drives

Ok so I I installed udevil and then created a .desktop file with the following and put it in my /.config/autostart folder:

[Desktop Entry]
Name=devmon 
Type=Application
Exec=devmon --mount-all | -a
Terminal=false
Icon=
Comment=
NoDisplay=false
Categories=Utility;

I then logged out and logged back in but still no luck. Permission denied on formatted ext4 and ext2 drives. Seems to work on ntfs and vfat though. Not even sure if my .desktop file noted above is even doing anything at autostart sad
BTW I'm using the default thunar file manager on bunsenlabs..

Thank you so very much

Last edited by tdlam (2019-08-14 17:46:05)


there are three kinds of people in the world...those that can count and those that can't

Offline

#11 2019-08-16 14:55:17

tdlam
Member
Registered: 2015-10-02
Posts: 12

Re: Need global solution for permission denied error for external drives

nope that command is useless in the .desktop file noted above. I get an error:

bash: -a: command not found

and the command:

devmon --mount-all | -a

is from the devmon man-page. So that was a dead end.

dunno what a fix may be at this point...


there are three kinds of people in the world...those that can count and those that can't

Offline

#12 2019-08-16 16:31:01

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,126

Re: Need global solution for permission denied error for external drives

Try using the full path for the command.


You must unlearn what you have learned.
    -- yoda

Offline

#13 2019-08-17 05:36:31

clusterF
Member
Registered: 2019-05-07
Posts: 330

Re: Need global solution for permission denied error for external drives

Hi tdlam,

try just

devmon -a

in the autostart desktop file.

But if you are using Bunsenlabs with openbox as window manager then it might need to go in openbox autostart file....

/home/YOURUSER/.config/openbox/autostart

put it at the bottom of the file like so...

devmon -a &

Im not using bunsenlabs, im using xfce desktop and i use startx, so i put mine .xinitrc file.

I generally use spacefm over thunar or others so i tested it out in thunar at it works at automounting the drives with permissions fine but unable to disconnect/eject the drive through thunar whereas i am able to in spacefm. It might not be a proper solution for what you need but maybe with some tinkering around there might be a solution to eject unmount with permission perhaps in modifying the devmon autostart command somehow?

To add, the drives i have used are created in other machines with different user credentials and such, so i can confirm devmon will work at being able read and write to the drive via in a different machine with different users.

Last edited by clusterF (2019-08-17 05:39:40)


"Common sense is like deodorant, those who need it the most never use it."

git: clusterF

Offline

#14 2019-08-17 05:47:06

clusterF
Member
Registered: 2019-05-07
Posts: 330

Re: Need global solution for permission denied error for external drives

Ok so unmounting is fairly simple as well, but needs to be done in the terminal or you could create .desktop file with the following. You could create a desktop shortcut or have it in the panel, not in the autostart file though.

devmon -u 

umounts all removable media.

If you wanted to mount again you would execute devmon -a again, in terminal or .desktop file.

Just to add, a good thing about the spacefm file manager is the devmon script is built into it if you have installed the udevil package, so there would be no need for autostarting or creating executables to unmount.

Last edited by clusterF (2019-08-17 06:02:43)


"Common sense is like deodorant, those who need it the most never use it."

git: clusterF

Offline

#15 2019-08-19 19:34:09

tdlam
Member
Registered: 2015-10-02
Posts: 12

Re: Need global solution for permission denied error for external drives

clusterF,
Thanks for the tips smile I can confirm that what you suggest works for Thunar in bunsenlabs except I still get weird permission errors even though it seems to eventually mount sometimes. The devmon -u works for unmounting. I also get same permission errors in spacefm as well but it mounts and unmounts.
Still...not real comfortable with the solutions as it needs to be seamless for mounting and unmounting for our charity folks.
I like spacefm but it seems a little too feature rich for our folks as it could get them into trouble if they clicked wrong buttons and then they would come back and we would be spending a lot of time undoing what they have done. Ideally I need a simple user friendly file manager that I can mount and unmount without permission issues in debian. Otherwise we continue with Ubuntu and we are stuck with massive updates after a couple of months which forces us to redo our install images.


there are three kinds of people in the world...those that can count and those that can't

Offline

#16 2019-08-20 10:53:55

clusterF
Member
Registered: 2019-05-07
Posts: 330

Re: Need global solution for permission denied error for external drives

^ Maybe post up some of the permission errors? Someone might be able to help with a fix.


"Common sense is like deodorant, those who need it the most never use it."

git: clusterF

Offline

#17 2019-08-20 14:17:37

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,126

Re: Need global solution for permission denied error for external drives

twoion wrote:
tdlam wrote:

What I need is a solution that will allow any user to copy and paste to external drives without permission denied errors. Sure there are tutorials on how to add to fstab a line of code that allows a specific external drive to be mounted to be copied to but as you can see there is no way to know what kind of drives folks we give computers to would have.

I can't speak for the current (but old-ish) Helium release but our private beta builds of the upcoming Lithium release do handle this flawlessly (had the pleasure of recovering my brother's Windows PC's data with it).

Perhaps somebody who uses BL or Debian as their main OS could chime in.

If BL-Lithium is handling this flawlessly, shouldn't Debian 10 stable
also handle it flawlessly?

@tdlam - have you tried using a regular Debian install? A Debian Xfce user interface shouldn't be too much different from Xunbuntu.

Otherwise we continue with Ubuntu...

Hopefully, only until Lithium is officially released.

Last edited by PackRat (2019-08-20 16:05:35)


You must unlearn what you have learned.
    -- yoda

Offline

#18 2019-08-20 14:52:18

clusterF
Member
Registered: 2019-05-07
Posts: 330

Re: Need global solution for permission denied error for external drives

^ The vanilla netinstall of Debian 10 works great and i have installed it on new and old hardware. Ive done a few installs for family and just chose "Debian Desktop, Xfce, Standard utils in the installer. Im quite impressed this time around for the Debian desktop. Im pretty sure bunsenlabs will be just as good once Lithium is officially announced.

Last edited by clusterF (2019-08-20 14:52:56)


"Common sense is like deodorant, those who need it the most never use it."

git: clusterF

Offline

#19 2019-08-28 20:49:33

tdlam
Member
Registered: 2015-10-02
Posts: 12

Re: Need global solution for permission denied error for external drives

Thanks guys.
I will try messing with Debian 10. Sorry for the late reply here but been super busy. If Debian 10 works ok we just may make the switch.


there are three kinds of people in the world...those that can count and those that can't

Offline

Board footer

Powered by FluxBB