Page 1 of 3 123 LastLast
Results 1 to 20 of 56

Thread: Raspbian permissions

  1. #1
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default Raspbian permissions

    Well g'day there.
    Got myself a raspberry pi to play with, version 4B 4GB.
    I wanted to copy some mp3's across to it via usb but get the error about not having permissions. So, I need to know how to set read/write permissions for anyone for an entire directory.
    I have searched and read about it but these here permissions are really confusing.



Look Here ->
  • #2
    Senior Member
    fandtm666's Avatar
    Join Date
    Jan 2008
    Posts
    5,502
    Thanks
    244
    Thanked 990 Times in 465 Posts
    Rep Power
    1189
    Reputation
    40447

    Default

    sudo chmod 775 -R then add folder location

  • The Following User Says Thank You to fandtm666 For This Useful Post:

    loopyloo (23-08-21)

  • #3
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default

    I'm doing it wrong aren't I ?


  • #4
    Premium Member
    wotnot's Avatar
    Join Date
    Nov 2019
    Location
    Scenic Rim, SE Qld
    Posts
    3,236
    Thanks
    1,462
    Thanked 2,934 Times in 1,510 Posts
    Rep Power
    1334
    Reputation
    58690

    Default

    chmod 775 755 -R

    command options are case sensitive

    edit: deboobified
    Last edited by wotnot; 24-08-21 at 12:28 AM.

  • The Following User Says Thank You to wotnot For This Useful Post:

    loopyloo (24-08-21)

  • #5
    Senior Member
    fandtm666's Avatar
    Join Date
    Jan 2008
    Posts
    5,502
    Thanks
    244
    Thanked 990 Times in 465 Posts
    Rep Power
    1189
    Reputation
    40447

    Default

    try

    sudo chmod 755 -R /media/pi/Storage
    Last edited by fandtm666; 23-08-21 at 10:08 PM.

  • The Following User Says Thank You to fandtm666 For This Useful Post:

    loopyloo (24-08-21)

  • #6
    Senior Member

    Join Date
    Dec 2011
    Location
    Tasmania
    Posts
    869
    Thanks
    1,485
    Thanked 956 Times in 416 Posts
    Rep Power
    544
    Reputation
    18321

    Default

    Is the USB drive from a Windows machine? It might be formatted as NTFS. Try putting it back in the Windows machine and setting “Everyone: Full Control”.

    I’m not sure if it matters, but I have always put the -R switch before the new permissions e.g.

    chmod -R 755 /media/pi/Storage

  • The Following User Says Thank You to shred For This Useful Post:

    loopyloo (24-08-21)

  • #7
    Premium Member
    wotnot's Avatar
    Join Date
    Nov 2019
    Location
    Scenic Rim, SE Qld
    Posts
    3,236
    Thanks
    1,462
    Thanked 2,934 Times in 1,510 Posts
    Rep Power
    1334
    Reputation
    58690

    Default

    Quote Originally Posted by shred View Post

    I’m not sure if it matters, but I have always put the -R switch before the new permissions e.g.

    chmod -R 755 /media/pi/Storage
    Technically more correct, but chmod parses the entire command line ...until it finds something that doesn't make sense =)

    For instance;

    Code:
    root@gallah:~# ls -ls docs
    total 12
    8 -rw-rw-r-- 1 root root 4518 Jul 19  2017 faqs.md
    4 -rw-rw-r-- 1 root root 2131 Jul 19  2017 localization_howto.md
    root@gallah:~# chmod 0755 -R docs
    root@gallah:~# ls -ls docs
    total 12
    8 -rwxr-xr-x 1 root root 4518 Jul 19  2017 faqs.md
    4 -rwxr-xr-x 1 root root 2131 Jul 19  2017 localization_howto.md
    root@gallah:~# chmod -R 0644 docs
    root@gallah:~# ls -ls docs
    total 12
    8 -rw-r--r-- 1 root root 4518 Jul 19  2017 faqs.md
    4 -rw-r--r-- 1 root root 2131 Jul 19  2017 localization_howto.md
    Both forms work the same.

  • The Following User Says Thank You to wotnot For This Useful Post:

    loopyloo (23-08-21)

  • #8
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default

    Tried a few different things but still get the error


  • #9
    Premium Member
    wotnot's Avatar
    Join Date
    Nov 2019
    Location
    Scenic Rim, SE Qld
    Posts
    3,236
    Thanks
    1,462
    Thanked 2,934 Times in 1,510 Posts
    Rep Power
    1334
    Reputation
    58690

    Default

    You're going to need pick in up a notch ~ you're typing 775 not 755 ...accuracy in typing is everything.

  • The Following User Says Thank You to wotnot For This Useful Post:

    loopyloo (23-08-21)

  • #10
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default

    Quote Originally Posted by wotnot View Post
    You're going to need pick in up a notch ~ you're typing 775 not 755 ...accuracy in typing is everything.
    Ah I see.... I must have misread post #2 then.

  • The Following User Says Thank You to loopyloo For This Useful Post:

    wotnot (24-08-21)

  • #11
    Premium Member
    wotnot's Avatar
    Join Date
    Nov 2019
    Location
    Scenic Rim, SE Qld
    Posts
    3,236
    Thanks
    1,462
    Thanked 2,934 Times in 1,510 Posts
    Rep Power
    1334
    Reputation
    58690

    Default

    LOL!.... point taken =)

  • The Following User Says Thank You to wotnot For This Useful Post:

    loopyloo (24-08-21)

  • #12
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default

    Still get permission denied error. I just don't get it.

    I remember hating linux before, now it's all coming back.

  • #13
    Premium Member
    wotnot's Avatar
    Join Date
    Nov 2019
    Location
    Scenic Rim, SE Qld
    Posts
    3,236
    Thanks
    1,462
    Thanked 2,934 Times in 1,510 Posts
    Rep Power
    1334
    Reputation
    58690

    Default

    do;

    ls -l /media/pi/Storage/music

    reply with result =)

  • #14
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default



    I actually did this just before your last comment.
    Last edited by loopyloo; 24-08-21 at 12:55 AM.

  • #15
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default



    That makes no sense.
    Last edited by loopyloo; 24-08-21 at 12:53 AM.

  • #16
    Premium Member
    wotnot's Avatar
    Join Date
    Nov 2019
    Location
    Scenic Rim, SE Qld
    Posts
    3,236
    Thanks
    1,462
    Thanked 2,934 Times in 1,510 Posts
    Rep Power
    1334
    Reputation
    58690

    Default

    do;

    sudo chmod -R 0666 /media/pi/Storage/music

    That should let you read/write to the dir

  • #17
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default

    Nup, permission denied again

    If I double click on any of the songs, VLC jumps in and plays it so no problem reading the usb.
    I'll try again in the morning.
    Last edited by loopyloo; 24-08-21 at 01:10 AM.

  • #18
    Premium Member
    wotnot's Avatar
    Join Date
    Nov 2019
    Location
    Scenic Rim, SE Qld
    Posts
    3,236
    Thanks
    1,462
    Thanked 2,934 Times in 1,510 Posts
    Rep Power
    1334
    Reputation
    58690

    Default

    Is /media/pi/Storage/music just a directory you created? (the 'music' dir)

  • #19
    Senior Member
    fandtm666's Avatar
    Join Date
    Jan 2008
    Posts
    5,502
    Thanks
    244
    Thanked 990 Times in 465 Posts
    Rep Power
    1189
    Reputation
    40447

    Default

    try logging as root in command then do the chmod

    su
    then enter password for root
    then
    chmod 755 -R /media/pi/Storage

  • #20
    Senior Member
    loopyloo's Avatar
    Join Date
    Feb 2008
    Location
    Mid North Coast NSW . Australia
    Age
    67
    Posts
    2,207
    Thanks
    1,431
    Thanked 469 Times in 313 Posts
    Rep Power
    415
    Reputation
    7297

    Default

    Quote Originally Posted by wotnot View Post
    Is /media/pi/Storage/music just a directory you created? (the 'music' dir)
    No, this directory would have been created by the OS during install.

  • Page 1 of 3 123 LastLast

    Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •