1

I'd like to be able to read files from external hdd or other partitions without having to su root every time or chmod the whole partition to myself/group. How can I give myself/group permission to read files that are owned by root and are outside of the / file system?

The external drive has NTFS and ext4 file systems, which are being automounted by dolphin.

Maybe there is a way to auto assign additional group for files not in /?

  • A lot of filesystems will let you specify a user= mount option for setting ownership to a non-root user. Is that the sort of solution you're looking for? What type of filesystem is on the external HDD? – Bratchley Dec 8 '14 at 14:34
  • What do you mean by "files that have no owner"? Can you give us a sample ls -l for one of those files? – smammy Dec 8 '14 at 15:10
  • By unowned I meant not assigned to any user by myself, but from ls -l on external partitions I see they have user root which looks like was automatically assigned. That is bad since I'd need to know a difference between my own system / for which I have root user and the rest of the system that does not belong to it. Maybe there is a way to auto assign additional group for files not in /? – Radivarig Dec 8 '14 at 16:09
  • What filesystem is on the external drive? How are you mounting it? This sounds like an X-Y problem... – jasonwryan Dec 8 '14 at 19:55
  • ntfs and ext4, automount by dolphin (I retrieved ls -l by manually mount /dev/sdaX /mnt/foo) and hopefully I'm still sticking to X - reading files (with user/group) that are owned by root and are outside of my os. – Radivarig Dec 8 '14 at 21:52
0

I think the option user users or group while mountig will do it:

mount /dev/sdx /<mountpoint> -o user=<myuser> or simmilar with the other options.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.