Forum › Forums › New users › New Users and General Questions › Mount drive
- This topic has 6 replies, 2 voices, and was last updated Mar 9-9:23 pm by anticapitalista.
-
AuthorPosts
-
March 9, 2022 at 6:21 pm #78836Member
blur13
Hi!
antiX 19.5
I realize this is probably a noob question, and I tried searching the forum for answers but didnt find any. Anyways, I use a file manager called nnn thats terminal based. I have a second harddrive for general storage. I can see the drive in /media/user/, but when I access it I get “permission denied”. ls -l shows drwx—— 2 root user. I open up SpaceFM and click on the drive and I’m in, no need to type in a password or anything. I check ls -l again and now its changed to drwxr-xr-x 5 user user. I can now access the drive using my other file manager, nnn. So whats going on here? What command is spacefm executing under the hood to automatically give me permission to access the drive? Any way to make it so that the second harddrive is accessible from startup?
March 9, 2022 at 6:32 pm #78838Forum Admin
anticapitalista
::Does the drive show up in /etc/fstab? If not, you could add it (sudo make-fstab in a terminal – but make sure you save your existing /etc/fstab before doing this)
Can you mount it using rox-filer?
What is the drive formatted as? (ext or ntfs)Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
March 9, 2022 at 6:43 pm #78839Member
blur13
::Thanks for the quick reply.
Rox filer gives me “Error scanning ‘/media/user/’: Can’t open directory: Permission denied”
I checked fstab and its not there.
I remember implementing the following that was posted on the forum by Xecure:
“Another thing you can do (it is not the recommended way, but it can easy users suffering) is to allow any user to mount internal drives (non-root). If you edit /etc/udevil/udevil.conf, search for # allowed_internal_devices, un-comment it and leave it looking like this:
allowed_internal_devices = *
This will let you mount all internal devices as your usual user without the need of root. This is OK on your personal configuration, but it is not recommended, as any users on your system would be able to mount your internal devices without any permissions and have access to your files.”So maybe spaceFM is using udevil to mount the drive and the above would explain why no password is needed?
Maybe I’m getting ahead of myself, if I use sudo make-fstab and add the drive there, could I access it as a user?
The drive has two partitions, one ext4 and one ntsf.
- This reply was modified 1 year, 1 month ago by blur13. Reason: added file system format of drive
March 9, 2022 at 7:16 pm #78842Member
blur13
::Did some more exploring and I’m pretty sure “udevil mount /dev/sdb5” is the command spaceFM is using, running that from the terminal mounts the drive with no password required. So could I simply put that command in the startup file to have the drive accessible? Do I need to put an “&” at the end? Ie:
udevil mount /dev/sdb5 &
March 9, 2022 at 7:33 pm #78843Forum Admin
anticapitalista
::I thought it was an internal drive, but it seems like it is an external one so editing /etc/fstab may not be of any use unless it is permanently plugged in.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
March 9, 2022 at 8:12 pm #78844Member
blur13
::It is an internal drive, connected to the motherboard using SATA cable. Its not USB or anything like that. I read in the man pages that udevil is mainly for removable storage but it seems to work with internal drives as well. But maybe editing fstab is the better approach?
March 9, 2022 at 9:23 pm #78845Forum Admin
anticapitalista
::ok. try what I posted above.
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
-
AuthorPosts
- You must be logged in to reply to this topic.