Page 1 of 1

How to set correct permissions for a separated data partition in dual boot with other linux

Posted: 17. Jun 2024, 16:58
by Pai Mei
Hi Salix users!

I have a dual boot system: Salix 15 XFCE and a Arch linux distro. Each of them have their own root and home partitions, but I have a data partition (part01) that I share with both. So, for comodoty reasons I done with thunar to allow acesss with user,groups and others read,write and execute (how fool me!). Then I realized the mistake, and have done in Salix terminal:
sudo chmod o-wx /run/media/part01
Now I can't acess my files from Salix, I only see the folders, and only with a rescue live cd a can acesss my data (what a mess!).

So, should I:
  • revert my acess to partition with chmod ugo+wx
  • or have to do chmod ug+wx
Thanks in advance!

PS: sorry my english. I'm not a native speaker.

Re: How to set correct permissions for a separated data partition in dual boot with other linux

Posted: 19. Jun 2024, 14:51
by djemos
Hi Pai Mei.
There are folders, sub-folders and files under /run/media/part01 as under any linux system.
The permissions for folders and sub-folders have to be 755 and for data files have to be 644
run this script from a terminal

Code: Select all

sudo find /run/media/part01 -type d -print0 | xargs -0 chmod 755
to set all folders and sub-folders under /run/media/part01 to 755 permissions
and

Code: Select all

sudo find /run/media/part01 -type f -print0 | xargs -0 chmod 644
to set permissions to 644 for all files inside folders and sub-folders. I suppose that you have only data files under folders and sub-folders.
And all will be fine.

Re: How to set correct permissions for a separated data partition in dual boot with other linux

Posted: 26. Jul 2024, 23:25
by Pai Mei
I appreciate this, but I do a backup in a NFST partition (as root using parted magic rescue cd) and formated my partitions to ext4 and done the hint from this post: https://itsfoss.com/set-write-permissio ... ntu-linux/ (used lmd6 and the admin user is mint).

Thanks in advance!

Re: How to set correct permissions for a separated data partition in dual boot with other linux

Posted: 29. Jul 2024, 15:53
by gapan
The easiest way to share files between two distributions would be to use the same user IDs in both systems. Not necessarily the same usernames, but their IDs, the 3rd field in /etc/passwd.