Page 1 of 1

[SOLVED] Cannot access other linux partitions, only as root

PostPosted: Jun 8th, '12, 02:03
by Bourbon
Hi All,

I have been just installing Mageia 2 KDE4 i586 (from live cd) and solved some problems, but this one is very funny: I cannot go to the other partitions (distros) on the same HD.
All of them are ¨ext4¨ and I get to mount them, but when I want open the user directory, the permission is denied. I have been following this footpath:
Control Centre>Local Discs>Manage Disc Partitions>Advanced>Allow users to mount etc. without any result. The file /etc/fstab shows only /Mageia and Swap, I did not try the process ¨mnt¨> ¨mkdir¨>¨mount¨ etc, because I can´t believe needing to do that on a distro born in 2012.
Is very interesting to see that the same problem comes out with PCLinuxOS (it is also the only one allowing me access to his partition and I can copy files between them). Any idea? :)

Cheers!

P.S.
Another problem concerning the keyboard: the OS is localized as ¨Italian¨ and the keyboard is ¨American¨; well, the key on the left corner ( ~ ` ) does not working properly, the same problem with the key on the right side close to ¨Enter¨ ( ´ ¨ ). Both of them needing high pressure to work (same problem on PCLinuxOS). Maybe the developpers could be interested to know it.

Re: Cannot access to partitions

PostPosted: Jun 8th, '12, 02:22
by wintpe
When something not working, does not matter what you believe need to go through those steps as a
Proccess of identifying root cause.

Are these the root filesystems of the other distros?

Are you running as root

If so that would be a good reason for permision denied.

But again without an fdisk -l of your disks, or a copy of fstab, or the results from attempting to mount each partition and see what settings are on them difficalt to say.

Have you tried dolphin, that usualy asks for the root password before mounting the disks.

Regards peter

Re: Cannot access to partitions

PostPosted: Jun 8th, '12, 03:01
by Bourbon
Hi Wintpe,

Thank you for your concerning, maybe due the language barrier I did not explaining properly the issue, I try again adding some data:
1 - All distros are on filesystem ¨ext4¨ ( / )
2 - I am running as normal (and unique) user
3 - This is the output of ¨fdisk -l¨:
[root@localhost dominum]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 testine, 63 settori/tracce, 121601 cilindri, totale 1953525168 settori
Unità = sectors di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Identificativo disco: 0xa47cbd91

Dispositivo Boot Start End Blocks Id System
/dev/sda1 * 63 1367179694 683589816 83 Linux
/dev/sda2 1367179695 1371083489 1951897+ 82 Linux swap / Solaris
/dev/sda3 1371083490 1566401759 97659135 83 Linux
/dev/sda4 1566401821 1953525167 193561673+ 5 Esteso
/dev/sda5 1566401823 1664060894 48829536 83 Linux
/dev/sda6 1664060958 1761720029 48829536 83 Linux
/dev/sda7 1761720093 1859379164 48829536 83 Linux
/dev/sda8 1859379228 1953525167 47072970 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 testine, 63 settori/tracce, 121601 cilindri, totale 1953525168 settori
Unità = sectors di 1 * 512 = 512 byte
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Identificativo disco: 0x0718beec

Dispositivo Boot Start End Blocks Id System
[root@localhost dominum]#

4 - Already I wrote about the file ¨fstab¨, I come again, is this one:
# Entry for /dev/sda6 :
UUID=5e003bb3-9f55-4328-829d-9950935ac2e2 / ext4 defaults 1 1
none /proc proc defaults 0 0
# Entry for /dev/sda2 :
UUID=0cb95e53-9d47-4291-9c20-7b2d24a8d3be swap swap defaults 0 0

5 - Yes, I try to mount the partitions using Dolphin; it is asking me the root password and the selected partition comes out but when going to open the user/documents directory I get the warning saying that the access is impossible.

Thank you again for your kindness, ciao

Re: Cannot access to partitions

PostPosted: Jun 8th, '12, 08:44
by wintpe
That fstab has root and everything under it and swap so thats ok

If you are mounting the root partition of another os, and you traverse that os, your seeing it in it none live perspectice.

The user area cound be on another partition, id have to see the fstab of the distribution you mounting to be sure.

However be easier if you open a terminal, move around the filesystem that way.

When you get to the location you are trying to and it says permision denied

Run ls -al and look at the permisions on the directory you are trying to enter, that should give you a clue.

Regards peter

Re: Cannot access to partitions

PostPosted: Jun 8th, '12, 21:52
by doktor5000
You may want to have a look at the relevant thread: viewtopic.php?p=5136#p5136

Re: Cannot access to partitions

PostPosted: Jun 8th, '12, 23:08
by Bourbon
Hi Doktor5000,

Already I was knowing that thread, but in my opinion, my problem is different.
I try to explain: I get all partitions even without root password after working on Mageia control Center and KDE Control Center, the point is that I can´t work on them.
For instance: I go to Fedora and clicking on /home, after that I go to the /user. At this point I get the message ¨Impossible access to /media/Fedora/home/user¨.
Working on Mageia the problem comes out with all distros on the hd excluding PCLinuxOS; all of them are on unique partition ¨/¨ with filesystem ¨ext4¨ and never I have been experiencing something like that.
I have been trying also the footpath >mkdir>mount> etc. without getting nothing.
I don´t wish to be rude, but Mageia is not my main distro, I have been installing it ¨to show some love¨ to the project. Now, this funny bug and the other one concerning the keyboard pushing me to remove it (and PCLinuxOS which giving to me the same problems); I did my best to solve without getting nothing and I don´t like to waste time, on the Forum you and an other person kindly trying to help me, unfortunately without result till now.
I will wait a couple of days, if the situation does not changes I remove both of them.

Thank you for your kind concern

Best Regards

Re: Cannot access to partitions

PostPosted: Jun 9th, '12, 00:45
by wintpe
can you for a min forget the gui environment and use the CLI.

Unix is traditionally a CLI environment, the tools you are using just call cli commands in a lot of cases.

open a terminal as I said and see if, once you have mounted the disks within dolphin if you can navigate to the /media/disk/home/user directory and if not, when you get an error, show it to us, and then run ls -al

then we will be able to see the underlying permissions.

also if in that same environment you can type "mount" on its own, it will tell us what mount options are being used on those drives.

also type "df -k ." and there is a dot at the end of that command, when you have reached as far as you can go.

try this as your user, and then as root, by using "su -"

otherwise we are trying to do the equivalent of paint your living room via the front doors keyhole.

regards peter

Re: Cannot access to partitions

PostPosted: Jun 9th, '12, 00:55
by jankusanagi
I'm not sure I understand the problem, but in a Ext{2/3/4} filesystem, there are file permissions, and file owners.

If you mount a partition used for a different GNU/linux system, say, Debian, under /mnt/debian in your Mageia system, your regular users probably won't be able to access the files there, or maybe read but not write, or something along those lines.

Simply because those files are not owned by your user, unless (this is a big unless), your user's UID is the same as that other user's UID, in that other distribution (in my example, Debian).

If by any chance, both are 500 or 1000, great. If they're different, the system interprets that as those files not belonging to you, and denies access.

Depending on what you wish to accomplish, you can change file permissions in those partitions, change your UID in your Mageia installation. Be CAREFUL either way. Don't do anything about that if you don't understand what you're doing.

You might also be able to allow access to those files without those changes by using some parameter in the mount command line.

Re: Cannot access to partitions

PostPosted: Jun 9th, '12, 01:56
by wintpe
agreed, thats what ive been trying to get him to show us.
regards peter

Re: Cannot access to partitions

PostPosted: Jun 9th, '12, 12:54
by doktor5000
@Bourbon: You didn't write what you changed, and the thread i linked to describe the problem that internal partitions from other operating systems require a root password to be mounted in dolphin f.ex. Did you try what was suggested in that post?

The other way is to setup mount points via /etc/fstab, which Peter tried to explain to you. Both are valid solutions to your problem.

Re: Cannot access to partitions

PostPosted: Jun 9th, '12, 13:32
by Bourbon
Hi All :)

I try to answer

@ Jankusanagi: - I get you, thank you; I did standard installation so I don´t understand why Mageia refuses to do the task well done by other distros.
Yes, working on file´s permissions and/or UID can generate mess, I am not a Linux Guru, I did not touch nothing and I am trying to supply the data asked by Wintpe.

@ Doktor5000: - Following that post I have been working on Mageia Control Center like using ¨diskdrake¨ (Manage partitions>Advanced>Options>User and Share partitions>Allow to all users).
Also I have been working on /etc/fstab adding partitions by UUID but I am afraid I did mistake, maybe I will try again.
At the moment (hoping got him properly) I am supplying the data requested by Wintpe.

@ Wintpe: - Hoping to get you properly, I am writing down here the CLI output:
[dominum@localhost ~]$ cd /media/Fedora/home/dominum
bash: cd: /media/Fedora/home/dominum: Permesso negato
[dominum@localhost ~]$ su
Password:
[root@localhost dominum]# cd /media/Fedora/home/dominum
[root@localhost dominum]# ls -al
totale 200
drwx------ 31 1000 1000 4096 giu 8 15:23 ./
drwxr-xr-x 3 root root 4096 mag 30 21:59 ../
drwxrwxr-x 4 1000 1000 4096 mag 31 00:57 .abrt/
drwx------ 3 1000 1000 4096 mag 31 00:20 .adobe/
drwxrwxr-x 4 1000 1000 4096 mag 31 01:14 .audacity-data/
-rw------- 1 1000 1000 1416 giu 8 00:11 .bash_history
-rw-r--r-- 1 1000 1000 18 apr 23 17:06 .bash_logout
-rw-r--r-- 1 1000 1000 193 apr 23 17:06 .bash_profile
-rw-r--r-- 1 1000 1000 124 apr 23 17:06 .bashrc
drwxr-xr-x 8 1000 1000 4096 mag 31 02:54 .cache/
drwx------ 15 1000 1000 4096 giu 7 22:19 .config/
drwx------ 3 1000 1000 4096 mag 30 22:01 .dbus/
drwxr-xr-x 2 1000 1000 4096 giu 7 23:24 Documenti/
drwxr-xr-x 3 1000 1000 4096 mag 30 22:06 Downloads/
-rw------- 1 1000 1000 16 mag 30 22:01 .esd_auth
drwxr-xr-x 2 1000 1000 4096 giu 1 08:57 .fontconfig/
drwx------ 3 1000 1000 4096 giu 8 15:23 .gconf/
drwxr-xr-x 24 1000 1000 4096 giu 5 21:25 .gimp-2.8/
drwx------ 5 1000 1000 4096 giu 1 08:43 .gnome2/
-rw-r--r-- 1 1000 1000 3072 mag 31 01:11 .grl-bookmarks
-rw-r--r-- 1 1000 1000 2048 mag 31 01:11 .grl-metadata-store
-rw-r--r-- 1 1000 1000 4096 mag 31 01:11 .grl-podcasts
drwxrwxr-x 2 1000 1000 4096 giu 8 00:01 .gstreamer-0.10/
-rw-rw-r-- 1 1000 1000 147 giu 8 15:23 .gtk-bookmarks
-rw-rw-r-- 1 1000 1000 2797 mag 31 01:13 .guvcviewrc
-rw------- 1 1000 1000 6816 giu 8 15:23 .ICEauthority
drwxr-xr-x 6 1000 1000 4096 mag 30 22:31 Immagini/
-rw-r--r-- 1 1000 1000 2388 giu 8 15:42 .imsettings.log
drwxr-xr-x 3 1000 1000 4096 mag 30 22:01 .local/
drwx------ 3 1000 1000 4096 mag 31 00:20 .macromedia/
drwx------ 3 1000 1000 4096 mag 30 22:01 .mission-control/
drwxr-xr-x 2 1000 1000 4096 mag 30 22:45 Modelli/
drwxr-xr-x 5 1000 1000 4096 mag 30 22:33 .mozilla/
drwxr-xr-x 3 1000 1000 4096 mag 31 01:30 Musica/
drwxr-xr-x 2 1000 1000 4096 mag 30 22:45 Pubblici/
drwx------ 2 1000 1000 4096 mag 30 22:01 .pulse/
-rw------- 1 1000 1000 256 mag 30 22:01 .pulse-cookie
drwxr-xr-x 2 1000 1000 4096 mag 30 22:45 Scrivania/
-rw-r--r-- 1 1000 1000 57 giu 7 21:42 .setroubleshoot
drwxrwxr-x 2 1000 1000 4096 mag 31 01:12 .shotwell/
drwx------ 5 1000 1000 4096 giu 5 11:04 .Skype/
drwxr-xr-x 2 1000 1000 4096 mag 30 22:01 .spice-vdagent/
drwx------ 4 1000 1000 4096 mag 30 22:03 .thumbnails/
drwxr-xr-x 3 1000 1000 4096 mag 31 02:00 Video/
drwxrwxr-x 8 1000 1000 4096 giu 5 10:39 Weather/
-rw------- 1 1000 1000 5131 giu 8 15:42 .xsession-errors
-rw------- 1 1000 1000 5149 giu 8 15:22 .xsession-errors.old
[root@localhost dominum]# mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,relatime,size=1547744k,nr_inodes=201141,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,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda6 on / type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
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=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
systemd-1 on /proc/bus/usb type autofs (rw,relatime,fd=15,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
usbfs on /proc/bus/usb type usbfs (rw,relatime,devgid=43,devmode=664)
gvfs-fuse-daemon on /run/user/dominum/gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,relatime,user_id=500,group_id=500)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/sda5 on /media/Fedora type ext4 (rw,nosuid,nodev,relatime,user_xattr,barrier=1,data=ordered)
[root@localhost dominum]# df -k.
df: opzione non valida -- "."
Usare «df --help» per ulteriori informazioni.
[root@localhost dominum]# df -k
File system 1K-blocchi Usati Disponib. Uso% Montato su
rootfs 48729936 3951076 42337384 9% /
devtmpfs 1547744 0 1547744 0% /dev
tmpfs 1551088 0 1551088 0% /dev/shm
tmpfs 1551088 868 1550220 1% /run
/dev/sda6 48729936 3951076 42337384 9% /
tmpfs 1551088 0 1551088 0% /sys/fs/cgroup
/dev/sda5 48770668 5277200 43005256 11% /media/Fedora
[root@localhost dominum]#

Best Regards

Re: Cannot access to partitions

PostPosted: Jun 9th, '12, 14:47
by madeye
If you take a look at the files they are all owned by user 1000 (that is the UID). Your user has another UID (else your username would be displayed). So that's your problem right there.
You could try to make a new user in mageia and specify it to use UID 1000. Then you will get the access you want for sure.

If you use the mageia control center to manage users, you can specify the UID when making a new user. Or if you know how, you can do the same from the commandline.
In the control center you can also see what your current UID is.

Re: [SOLVED] Cannot access to partitions

PostPosted: Jun 9th, '12, 16:02
by Bourbon
Madeye, you are the winner!

I don´t know how to change the UID of the current user, so I have been creating a new user giving to him UID 1000 and now I can work to the partitions; never I should be able to find the solution alone, never thinking about UID, which commonly is 1000 as default to every distro I have been installing till now.

Thank you very much, ciao
(standing ovation) :D

Re: [SOLVED] Cannot access to partitions

PostPosted: Jun 9th, '12, 16:13
by madeye
Glad to have been able to help.

Btw. there is a command called usermod that can change the UID. I have never used it, so I cannot tell you much about it.
The manpage however states that i is able to change the UID for a user, and at the same time change the files in the users home directory. Any files outside the home directory will need to be changed manually.

If you are adventurous you could try to use it. That is for you to decide. ;)

Re: [SOLVED] Cannot access to partitions

PostPosted: Jun 9th, '12, 16:39
by Bourbon
Ciao Madeye,

Yes, after writing on the Forum I found that command and (after cancelling the new user just created) I did:
Code: Select all
# usermod -u 1000 dominum
# groupmod -g 1000 dominum

Unfortunately something is wrong because the user ¨dominum¨ is no more suitable; so, using the guest account I have been assigning UID 500 again to ¨dominum¨ (it is working again now) and recreating a new user account with UID 1000

P.S.
Unfortunately the language is a barrier :) reading again with more attention, I see that Jankusanagi gave to me the right clue about UID too

Re: Cannot access to partitions

PostPosted: Jun 9th, '12, 17:54
by doktor5000
Bourbon wrote:Hi All :)

@ Doktor5000: - Following that post I have been working on Mageia Control Center like using ¨diskdrake¨ (Manage partitions>Advanced>Options>User and Share partitions>Allow to all users).
Also I have been working on /etc/fstab adding partitions by UUID but I am afraid I did mistake, maybe I will try again.


Well, that is not what that post proposes. Also you only need to do only one way or the other, not necessarily both.

Re: Cannot access to partitions

PostPosted: Jun 9th, '12, 18:27
by Bourbon
Well, that is not what that post proposes. Also you only need to do only one way or the other, not necessarily both.

Yes :) I have been ¨extracting¨ and did the first attempt and after that the second one.
Fortunately the issue is solved now (just needing to work on UID/User).

Thank you again for your kind concern, ciao