Permission for external hard drive

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

Permission for external hard drive

Postby dooblizz » Sep 5th, '15, 17:18

Hi there Mageia Magicians,
I had access to an external hard drive in Mageia 4 but as I upgraded to Mageia 5, I can't get access to my files because I am not the owner and do not have permission. I have tried looking through all settings but can't seem to find it! What needs to be done to solve this issue?
Thanks
dooblizz
 
Posts: 4
Joined: Sep 5th, '15, 17:16

Re: Permission for external hard drive

Postby doktor5000 » Sep 5th, '15, 20:15

What filesystem does that hard drive use? If it is mounted, please show the output of
Code: Select all
mount
ls -al /mountpoint/of/harddrive
ls -aln /mountpoint/of/harddrive
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: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Permission for external hard drive

Postby dooblizz » Sep 7th, '15, 04:28

Thanks for the quick answer Doktor, I was out of town.
I believe I formatted it to ext
Code: Select all
$ mount
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=2014808k,nr_inodes=503702,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/sda1 on / type ext4 (rw,relatime,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /sys/fs/cgroup type tmpfs (ro,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,cpu,cpuacct)
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=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw,relatime,mode=755)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /media/windows type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
/dev/sda6 on /home type ext4 (rw,relatime,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=404424k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sdc1 on /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
/dev/sdd1 on /run/media/jay/Lexar type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)
[jay@localhost ~]$ ls -al /mountpoint/of/harddrive
ls: cannot access /mountpoint/of/harddrive: No such file or directory
[jay@localhost ~]$ ls -aln /mountpoint/of/harddrive
ls: cannot access /mountpoint/of/harddrive: No such file or directory
dooblizz
 
Posts: 4
Joined: Sep 5th, '15, 17:16

Re: Permission for external hard drive

Postby doktor5000 » Sep 7th, '15, 08:00

dooblizz wrote:
Code: Select all
$ mount
/dev/sdc1 on /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae type ext4 (rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
/dev/sdd1 on /run/media/jay/Lexar type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)



Is it /dev/sdc1 ? /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae formatted as ext4?

dooblizz wrote:
Code: Select all
[jay@localhost ~]$ ls -al /mountpoint/of/harddrive
ls: cannot access /mountpoint/of/harddrive: No such file or directory
[jay@localhost ~]$ ls -aln /mountpoint/of/harddrive
ls: cannot access /mountpoint/of/harddrive: No such file or directory

I though it was obvious that /mountpoint/of/harddrive is a placeholder and should have been replaced by the mountpoint of the harddrive.

Please show the output of
Code: Select all
ls -ald /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae
ls -aln /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae
id
as your normal user.

FWIW, how did you upgrade to Mageia 5? Which of the methods from https://wiki.mageia.org/en/Mageia_5_Rel ... m_Mageia_4 did you use?
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: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Permission for external hard drive

Postby dooblizz » Sep 7th, '15, 23:01

Ouch! My bad, I didn't notice that as I was in a hurry (was leaving the city).
Code: Select all
$ ls -ald /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae
drwxrwxrwx 10 500 root 4096 Aug  5 18:28 /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae/
[jay@localhost ~]$ ls -aln /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae
total 48
drwxrwxrwx  10  500    0  4096 Aug  5 18:28 ./
drwxr-x---+  3    0    0    60 Sep  7 15:49 ../
drwxrwxr-x   4  500  500  4096 Jun 12 23:30 Anime/
drwxr-xr-x   7  500  999  4096 May 31 06:32 Barb saved/
drwxr-xr-x   5  500  999  4096 Mar 23 22:00 Jay saved/
drwx------   2  500    0 16384 Mar 23 21:12 lost+found/
drwx------   4  500  500  4096 Mar 21 14:18 OLD/
drwx------   5 1000 1000  4096 Aug  6 19:50 .Trash-1000/
drwxr-xr-x   2  500  500  4096 Jun 19 17:30 Yellow Magic Orchestra - 1979 - Solid State Survivor [1987] [32XA-139] {De-emphasised} [FLAC]/
drwxr-xr-x   2  500  500  4096 Jun 19 17:34 Yellow Magic Orchestra - BGM (Restless, 1992) - FLAC/
[jay@localhost ~]$ id
uid=1000(jay) gid=1000(jay) groups=1000(jay),7(lp),10(wheel),1001(printadmin)


I installed a brand new installation from Mageia 4 using a DVD!
Thanks for all your help Doktor5000, you are a wealth of knowledge.
dooblizz
 
Posts: 4
Joined: Sep 5th, '15, 17:16

Re: Permission for external hard drive

Postby doktor5000 » Sep 8th, '15, 09:42

dooblizz wrote:I installed a brand new installation from Mageia 4 using a DVD!

Are you sure? In the first post you say that you upgraded from Mageia 4 to Mageia 5, and now you have the problem. When asked how you upgraded, you say that you installed Mageia 4.
But still the UID (user ID) from your current user is 1000, which implies that this user has been created under Mageia 5 fresh installation.
And if you would have done an upgrade from Mageia 4 to Mageia 5, you would have kept your old UID of 500 and would not have the problem you currently have.

dooblizz wrote:$ ls -ald /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae
drwxrwxrwx 10 500 root 4096 Aug 5 18:28 /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae/

[jay@localhost ~]$ ls -aln /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae

drwxrwxr-x 4 500 500 4096 Jun 12 23:30 Anime/
drwxr-xr-x 7 500 999 4096 May 31 06:32 Barb saved/
drwxr-xr-x 5 500 999 4096 Mar 23 22:00 Jay saved/
drwx------ 2 500 0 16384 Mar 23 21:12 lost+found/
drwx------ 4 500 500 4096 Mar 21 14:18 OLD/
drwx------ 5 1000 1000 4096 Aug 6 19:50 .Trash-1000/
drwxr-xr-x 2 500 500 4096 Jun 19 17:30 Yellow Magic Orchestra - 1979 - Solid State Survivor [1987] [32XA-139] {De-emphasised} [FLAC]/
drwxr-xr-x 2 500 500 4096 Jun 19 17:34 Yellow Magic Orchestra - BGM (Restless, 1992) - FLAC/

uid=1000(jay) gid=1000(jay) groups=1000(jay),7(lp),10(wheel),1001(printadmin)


There's an easy fix and a proper fix - depending on whether you want access that drive only from your Mageia 5 installation, or maybe also on installations where you have a UID of 500.
You can read more about this issue here: viewtopic.php?f=8&t=10001
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: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Permission for external hard drive

Postby dooblizz » Sep 13th, '15, 02:53

Sorry for the confusion. I meant I had Mageia 4 then I did a fresh installation of Mageia 5! I want to use this hard drive with other distros so I am unsure what to do next? Do other distributions have trouble if it is 500 or 1000 UID? So it is all about the use ID being 1000 now that it can't gain permission?
dooblizz
 
Posts: 4
Joined: Sep 5th, '15, 17:16

Re: Permission for external hard drive

Postby doktor5000 » Sep 13th, '15, 09:53

Most newer distros use UID starting with 1000 for normal users. You can easily gain access if you simply change the ownership of all files and folders to your new id 1000, as root:
Code: Select all
chown -R jay:jay --from=500:500 /run/media/jay/a17961f7-38d6-431c-adde-2d2dcf71e9ae

Or you can do as explained in viewtopic.php?p=59304#p59304 and the above linked thread.
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: 18059
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest