WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: ownership and privileges  (Read 551 times)

Offline h2sammo

  • Jr. Member
  • **
  • Posts: 80
    • Best podcast on LI-ion
ownership and privileges
« on: January 29, 2019, 07:20:49 PM »
Code: [Select]
drwxr-xr-x    2 502      502          12288 Jan 30 11:03 Downloads/

im trying to access this Download folder from a different Linux distribution, I can open files but cannot save changes to them. I am not sure what "502" means. Do i have to change the folder ownership from the Linux distro in which it was created or can i do it from inside tinycore? Also, I still want to be able to use the folder from its original Linux distro, but want to be able to open and modify files in there from Tinycore as well.
Thank you for your help!

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6493
Re: ownership and privileges
« Reply #1 on: January 29, 2019, 07:43:15 PM »
Hi h2sammo
Users and groups are assigned numbers. There is no 502 assigned in Tinycore so it just shows up as the number. The simplest
way to fix this would be:
Code: [Select]
sudo chmod 757 DownloadsThis will give write access to non 502 users. I'd need to see the directory listing for  Downloads  to tell you what to
change the access rights to for those files.

Offline h2sammo

  • Jr. Member
  • **
  • Posts: 80
    • Best podcast on LI-ion
Re: ownership and privileges
« Reply #2 on: January 29, 2019, 09:20:42 PM »
an excerpt of files inside Downloads folder:

Code: [Select]
tc@box:~$ ls -l /mnt/sdb3/Downloads
total 1043024
-rwxr-x---    1 502      502         964878 Dec 12 04:30 1997_hossain_yardne  5595839.pdf
-rwxr-x---    1 502      502         315247 Dec 15 15:19 1_72V270AH(NMC).pdf
-rwxr-x---    1 502      502         392396 Dec 15 15:19 1_73.6V240AH (LTO).
-rw-r--r--    1 502      502         347321 Jan 14 15:23 2000_lee_macromolec
-rw-r--r--    1 502      502         261847 Jan 14 13:40 2001_ding_eur_pol_j
-rw-r--r--    1 502      502         601661 Jan 15 12:19 2005_amine_US685834  f

btw i tried the command recommended by you but i still dont have access to make changes to that folder.
Thank you for your help!

Offline h2sammo

  • Jr. Member
  • **
  • Posts: 80
    • Best podcast on LI-ion
Re: ownership and privileges
« Reply #3 on: January 29, 2019, 09:36:19 PM »
i actually did the following command:
Code: [Select]
sudo chmod 757 /mnt/sdb3/Downloads/*

and now i can modify files in that folder. however, they still show as owned by 502. i dont get it:

Code: [Select]
tc@box:~$ ls -l /mnt/sdb3/Downloads/*
-rwxr-xrwx    1 502      502         964878 Dec 12 04:30 /mnt/sdb3/Downloads/1997_hossain_yardney_US5595839.pdf
-rwxr-xrwx    1 502      502         315247 Dec 15 15:19 /mnt/sdb3/Downloads/1_72V270AH(NMC).pdf

Thank you for your help!

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6493
Re: ownership and privileges
« Reply #4 on: January 29, 2019, 09:39:11 PM »
Hi h2sammo
That first command was to give you access to the directory. To allow you to modify the files, try this:
Code: [Select]
cd /mnt/sdb3/Downloads
sudo chmod o=rw *

Online Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6493
Re: ownership and privileges
« Reply #5 on: January 29, 2019, 09:42:58 PM »
Hi h2sammo
Quote
... and now i can modify files in that folder. however, they still show as owned by 502. i dont get it: ...
There are 3 sets of permissions, user, group, and other. The permissions that we want to modify is for other. User and
group on that device are 502. Other is anyone that is not 502.