[SOLVED] change permissions of external harddisk mountpoint

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] change permissions of external harddisk mountpoint

Postby Swansen » Sep 26th, '14, 15:44

so, i tried

Code: Select all
[root@localhost live]# chown -R live:live /run/media/live/media_drive
chown: cannot access ‘/run/media/live/media_drive’: No such file or directory


but you can see the result. the HDD is named "media drive" so i think i have the name right with the _ underscore.

This is an external USB adapted HDD.
Last edited by doktor5000 on Sep 27th, '14, 12:04, edited 1 time in total.
Reason: adjusted thread title, marked [SOLVED]
Swansen
 
Posts: 14
Joined: Feb 13th, '12, 22:54

Re: Could not enter folder /run/media/live/media drive. (liv

Postby doktor5000 » Sep 26th, '14, 17:31

Why do you try that at all? And assuming from the username, this is when you have one of the Mageia live media booted, correct?

Please show the output as root of
Code: Select all
mount
ls -al /run/media/live/media_drive
df /run/media/live/media_drive
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Could not enter folder /run/media/live/media drive. (liv

Postby Swansen » Sep 26th, '14, 17:47

yes, sorry, forgot to add that, liveCD. i take that back, it was in the title, but might not have been very clear.

Code: Select all
[root@localhost live]# mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=1017068k,nr_inodes=254267,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
/dev/loop0 on /run/mgalive/ovlsize type squashfs (ro,relatime)
overlayfs on / type overlayfs (rw,relatime,lowerdir=/live/distrib,upperdir=/live/memory)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
tmpfs on /tmp type tmpfs (rw)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime,mode=755)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
gvfsd-fuse on /run/user/500/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=500,group_id=500)
/dev/sdb1 on /run/media/live/media drive type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
/dev/sda1 on /run/media/live/5EACAB5FACAB3107 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
[root@localhost live]# ls -al /run/media/live/media_drive
ls: cannot access /run/media/live/media_drive: No such file or directory
[root@localhost live]# df /run/media/live/media_drive
df: ‘/run/media/live/media_drive’: No such file or directory
Last edited by Swansen on Sep 26th, '14, 18:38, edited 1 time in total.
Swansen
 
Posts: 14
Joined: Feb 13th, '12, 22:54

Re: Could not enter folder /run/media/live/media drive. (liv

Postby doktor5000 » Sep 26th, '14, 17:53

Swansen wrote:/dev/sdb1 on /run/media/live/media drive type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
/dev/sda1 on /run/media/live/5EACAB5FACAB3107 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
[root@localhost live]# ls -al /run/media/live/media_drive
ls: cannot access /run/media/live/media_drive: No such file or directory
[root@localhost live]# df /run/media/live/media_drive
df: ‘/run/media/live/media_drive’: No such file or directory


See the difference? The drive name is "media drive" with a blank, and you try with an underscore. Will always fail.

You still didn't answer the question on WHY you are trying that and what you want to achieve.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Could not enter folder /run/media/live/media drive. (liv

Postby Swansen » Sep 26th, '14, 18:51

what i want to achieve is in the title and first post. i can't gain access to a drive connected externally via USB. for some reason i don't have permission.

also i stated i wasn't sure if i needed an underscore or not, also in first post. console sees "media" and "drive" as separate commands via the space.

inputting the above command with
/run/media/live/media drive"

outputs
cannot access /run/media/live/media No such file or directory

It doesn't recognize "media drive" is one word.

i don't know, maybe i'm missing something, but, i think what i'm asking is pretty clear. i can't gain access to a HDD... for some reason i don't have the rights.
Last edited by Swansen on Sep 26th, '14, 19:04, edited 1 time in total.
Swansen
 
Posts: 14
Joined: Feb 13th, '12, 22:54

Re: Could not enter folder /run/media/live/media drive. (liv

Postby Swansen » Sep 26th, '14, 18:55

i've tried plugging in the drive after and before boot. same results. the drive mounts fine, but trying to enter the drive via dolphin doesn't work, it creates the above situation.

for some more details, the drive is ext4 formated one partition, no OS. also i can view the drive through the partition tool through the control center, but thats doesn't necessarily do anything for me.

Code: Select all
chown: cannot access ‘/run/media/live/media’: No such file or directory
chown: cannot access ‘drive’: No such file or directory


i've had issues like this before.. i am kinda leaning towards this being an issues with dolphin, if the liveCD came with another file manager(say nautilus) i think i'd be having luck. either way, i'm sure there is a simple solution for this.. its just not one i know of.

and to make this a little more clear. when i click on the drive "media drive" in dolphin, Could not enter folder /run/media/live/media drive shows up.
Swansen
 
Posts: 14
Joined: Feb 13th, '12, 22:54

Re: Could not enter folder /run/media/live/media drive. (liv

Postby doktor5000 » Sep 26th, '14, 19:38

Swansen wrote:what i want to achieve is in the title and first post. i can't gain access to a drive connected externally via USB. for some reason i don't have permission.

No, what's in the title and what you described so far are two different things.
What you want: read/write access to an ext4 partition on an external harddrive as normal user during a mageia live session
What's in the title and what you written so far: attempts to fumble with the permissions of the mountpoint

For the chown command, this should work (you have to quote the blank, the shell does wordsplitting on blanks, hence you get exactly two error messages as in your last post)

Code: Select all
chown live:live /run/media/live/media\ drive

This should work, too:
Code: Select all
chown live:live '/run/media/live/media drive'


You should definitely avoid to recursively change the owner and group of all the files on that partition, as you tried with chown -R ... that is, if you still need your files.

But all that will not solve the underlying issue - usually dolphin should ask for the root password to mount or access that drive.
In the live session, can you please show the output of the following command run as root
Code: Select all
ps -ef | grep -v grep | grep -i polkit
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Could not enter folder /run/media/live/media drive. (liv

Postby Swansen » Sep 26th, '14, 19:56

Code: Select all
[root@localhost live]# ps -ef | grep -v grep | grep -i polkit
polkitd   1412     1  0 05:21 ?        00:00:00 /usr/lib/polkit-1/polkitd --no-debug
live      3453     1  0 05:26 ?        00:00:01 /usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1



hmm. with the chown solution i just was searching for any solution prior to asking and thats what i found first. so i'm understanding that chown changes the permission specifically to whatever is designated? so if there wasn't any owner to a file/drive and chown was used, then only the user given permission with chown would be able to use it right? if i'm understanding that correctly.
Swansen
 
Posts: 14
Joined: Feb 13th, '12, 22:54

Re: Could not enter folder /run/media/live/media drive. (liv

Postby doktor5000 » Sep 26th, '14, 23:26

Swansen wrote:
Code: Select all
[root@localhost live]# ps -ef | grep -v grep | grep -i polkit
polkitd   1412     1  0 05:21 ?        00:00:00 /usr/lib/polkit-1/polkitd --no-debug
live      3453     1  0 05:26 ?        00:00:01 /usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1

Looks good, after normal boot to live mode, when clicking on the partition in the left panel in dolphin (called "places") you should get a popup asking to provide the credentials, if your use cannot mount or access that partition directly.


Swansen wrote:so i'm understanding that chown changes the permission specifically to whatever is designated?

Exactly.

Swansen wrote:so if there wasn't any owner to a file/drive and chown was used, then only the user given permission with chown would be able to use it right? if i'm understanding that correctly.

There's always an owner. My point was, would you have used the chown -R live:live like you posted in the first post,
you would have changed all files and all directories to owner and group of "live" - no matter what was there before.
So if you do still need those files, I'd not do that.

The other chown I've posted only changes ownership of the mountpoint, so you should be able to access it as normal user.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Could not enter folder /run/media/live/media drive. (liv

Postby Swansen » Sep 26th, '14, 23:47

ok. i'm a little confused.

so is the suggest to use the chown command you provided or?

yeah right, in the 'places' i tried entering the "media drive" partition but that error came up. could enter every other partition fine, the NTFS HDD(windows), the temporary /home, just not the external USB HDD.
Swansen
 
Posts: 14
Joined: Feb 13th, '12, 22:54

Re: Could not enter folder /run/media/live/media drive. (liv

Postby doktor5000 » Sep 26th, '14, 23:55

Swansen wrote:so is the suggest to use the chown command you provided or?

Yep, please try that.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Could not enter folder /run/media/live/media drive. (liv

Postby Swansen » Sep 27th, '14, 03:40

awesome, it worked. also in case anyone else comes across, command must be entered as su.

solved
Swansen
 
Posts: 14
Joined: Feb 13th, '12, 22:54


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest