Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 56

Thread: Raspbian permissions

  1. #21
    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

    Quote Originally Posted by loopyloo View Post
    No, this directory would have been created by the OS during install.
    ok so you did not create the directory so the chmod will not work
    unless you do it as super user

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

    loopyloo (24-08-21)



  • #22
    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 fandtm666 View Post
    try logging as root in command then do the chmod

    su
    then enter password for root
    then
    chmod 755 -R /media/pi/Storage
    Good thought but that didn't work either.

    Strange thing happened this morning. The pi didn't see the usb drive at all, so I put it into my windows machine and it said the drive needed formatting. Ok I formatted it and loaded some music back on but it made no difference to the pi.

  • #23
    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 fandtm666 View Post
    try logging as root in command then do the chmod

    su
    then enter password for root
    then
    chmod 755 -R /media/pi/Storage
    No, that's the wrong modal (he just wants r/w perms to the files, not to make them executable)


    Quote Originally Posted by loopyloo View Post
    No, this directory would have been created by the OS during install.
    Ok....let's backtrack and establish what you're trying to do here with the RPi.... just because your original post said making the files available to 'anyone' (and that infers more than 1 user logging into the RPi, which likely isn't the case =)

    So what are you trying to accomplish....media server? The issue you're having, is that the user 'pi' doesn't have access to the music directory (owned by root)...but I don't want to tell you how to change things until I know your direction

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

    loopyloo (24-08-21)

  • #24
    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 just tried creating my own directory "My music". I went to logon, entered my raspberry pi password then attempted to create it. Again Permission denied.

  • #25
    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
    No, that's the wrong modal (he just wants r/w perms to the files, not to make them executable)




    Ok....let's backtrack and establish what you're trying to do here with the RPi.... just because your original post said making the files available to 'anyone' (and that infers more than 1 user logging into the RPi, which likely isn't the case =)

    So what are you trying to accomplish....media server? The issue you're having, is that the user 'pi' doesn't have access to the music directory (owned by root)...but I don't want to tell you how to change things until I know your direction
    I just wanted to test some sound files.
    Wanted to copy a few songs from usb to the pi drive then open them with 'whatever' pi media player, probably VLC.
    Obviously I cant move any files anywhere at the moment and that makes pi totally useless.

    P.S. Available to anyone just means I can't be bothered with passwords.
    Last edited by loopyloo; 24-08-21 at 10:10 AM.

  • #26
    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 loopyloo View Post
    I just wanted to test some sound files.
    Wanted to copy a few songs from usb to the pi drive then open them with 'whatever' pi media player, probably VLC.
    Obviously I cant move any files anywhere at the moment and that makes pi totally useless.
    M'kay....with an RPi, it's good practice to keep media files on removable media instead of copying them to filesystem sdcard. Removable media will always appear at /media/pi/Storage/[drive ID], and udev scripts handle all the fiddly stuff (format of drive, file permissions etc)

    That is to say, you should be able to plugin a USB drive, and access it/play the files from within the pi account....true?

    To do what you want to do here, would mean....become root

    Code:
    sudo su
    ....copy files as root to the target directory..

    Code:
    cp /path/to/some/filename.mp3 /media/pi/Storage/music/
    ...change ownership of the files to the pi user...

    Code:
    chown pi /media/pi/Storage/music/*
    ...exit root user...

    Code:
    exit
    ...and you should be able to play those files as user pi

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

    loopyloo (24-08-21)

  • #27
    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

    The SD card (hard drive) in the pi is 32GB so plenty of room.
    I can play the songs direct from the usb stick no problem, copy is the problem.

    Copying via terminal doesn't like a directory name or filename to have more than one word in it, as you'll see : silk degrees and long road out of eden.
    I moved 'jojo' to the root of the usb and it then copied ok. Then I made a directory 'Sherbet' on the usb root and moved 'Skyline.mp3' there, the folder and song could then be copied.

    Didn't need to use chown yet both songs will play.

    So why can't I copy stuff with the file explorer ? terminal is way too clunky to copy multiple files

    Last edited by loopyloo; 24-08-21 at 11:55 AM.

  • #28
    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

    when i have wanted to put files on my pi units i have found the easiest way has always
    been via ftp ( port 22 )
    quick simple and can even create folders etc
    Last edited by fandtm666; 24-08-21 at 11:58 AM.

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

    loopyloo (24-08-21)

  • #29
    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

    The evil of whitespace... for cmdline you must wrap things in quotes... ie; cp /media/pi/USB4/eagles/"long road out of eden.mp3" /media/pi/Storage/music/

    likewise... /media/pi/USB4/"Silk Degrees"/georgia.mp3

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

    loopyloo (24-08-21)

  • #30
    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

    More like the evil of linux.
    So can you explain this one ? 'Greatest hits' is the folder. Trying to copy an entire folder.



    As a side note : Are you sure the -r has to be capitalized ? look at the beginning of the line.
    Last edited by loopyloo; 24-08-21 at 12:54 PM.

  • #31
    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 loopyloo View Post
    More like the evil of linux.
    So can you explain this one ? 'Greatest hits' is the folder.



    As a side note : Are you sure the -r has to be capitalized ? look at the beginning of the line.
    Nah, whitespace is evil of it's own right, and has been for decades, and it's the lack of permissions and all this jazz you don't understand, that makes windows the hacking target it is =)

    The -r you're talking about, was relative to the chmod command -- you're using the cp (copy) command now

    The error line (in English) is saying that you asked to copy a directory, but didn't include all the files in the directory on the commandline (the -r flag) and cp will routinely ignore that directory ... in other words, it was trying to inform you that you should've typed;

    cp -r /media/pi/USB4/Carpenters/"Greatest Hits"/ /media/pi/Storage/music

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

    loopyloo (24-08-21)

  • #32
    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
    Nah, whitespace is evil of it's own right, and has been for decades, and it's the lack of permissions and all this jazz you don't understand, that makes windows the hacking target it is =)

    The -r you're talking about, was relative to the chmod command -- you're using the cp (copy) command now

    The error line (in English) is saying that you asked to copy a directory, but didn't include all the files in the directory on the commandline (the -r flag) and cp will routinely ignore that directory ... in other words, it was trying to inform you that you should've typed;

    cp -r /media/pi/USB4/Carpenters/"Greatest Hits"/ /media/pi/Storage/music
    Ok now we're getting somewhere. That worked well.
    But why can't I copy files using the file explorer ?

  • #33
    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

    But why can't I copy files using the file explorer ?
    Likely because you're copying as root in the shell, but logged in using the file manager (GUI) as user pi ..

    TBH, I tend not to use the GUI on a RPi, and just install mc (midnight commander) for file operations -- nor do I use /media as the place to store files like this (due to the automation of mount operations there), so I just copy files into my home directory for this sort of thing.

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

    loopyloo (24-08-21)

  • #34
    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
    chmod 775 755 -R

    command options are case sensitive

    edit: deboobified
    Lol

  • #35
    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 loopyloo View Post
    Lol
    Haha.... man, that's long ago in the early 90's for me, starting out in linux, mostly from irc chat in the main, with linux users trying to help other linux users, and these other (learning) users would always been typing the wrong, and you'd say "look at what you typed, ya boob", but is was just as often muttered in a self-deprecating way, when you can to the realization the reason why something didn't work, it was because of a simple typo...talking to one's self "You're a boob!" This is not to infer, that when I said 'pick it up a notch', I was suggesting you have sagging boobs...but in this SJW world, it seems we're no long free to use the word boobs with such frivolity, see -> ...and it doesn't matter you use the word in an entirely different manner ...hmm... 'man-boobs' ...that'll keep the karens busy =)

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

    loopyloo (26-08-21)

  • #36
    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
    Likely because you're copying as root in the shell, but logged in using the file manager (GUI) as user pi ..

    TBH, I tend not to use the GUI on a RPi, and just install mc (midnight commander) for file operations -- nor do I use /media as the place to store files like this (due to the automation of mount operations there), so I just copy files into my home directory for this sort of thing.
    Just had a look at that midnight commander.
    Crikey that's like back in the 8086 days isn't it ?
    I appreciate your help but, Wish I could work out how to copy/paste those files just using the explorer. That's what it's meant for- ease of use, click and drag. Rarely need to use the cmd in windows these days.
    If I can't get full control over this thing then it's useless. I mean it's only a raspberry pi, It won't be used for emails or surfing , I've got the office computer for that, so security need not be a high priority.
    Just want full access to everything without mucking about with passwords all the time. There must be a way to do that.

  • #37
    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

    is there a reason you installed rasbian ??
    i prefer the full ubuntu setup on mine easier to work with

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

    loopyloo (28-08-21)

  • #38
    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 fandtm666 View Post
    is there a reason you installed rasbian ??
    i prefer the full ubuntu setup on mine easier to work with
    It's what came with it on the SD card.
    It Has NOOBS on the SD which will install Raspberry Pi OS full (Raspbian) and Libraelec OS which is a media center.
    When the Pi is started you select which OS you want to boot.
    Last edited by loopyloo; 27-08-21 at 06:38 PM.

  • #39
    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

    you can easily download the ubuntu distro and install it on
    a sd card and load it up . Thats one of the good things about the pi
    can try different os with little hassle.

    go here has all the files you will need and takes about 5 minutes all up.

    Last edited by fandtm666; 27-08-21 at 07:56 PM.

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

    loopyloo (28-08-21)

  • #40
    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 loopyloo View Post
    Just had a look at that midnight commander.
    Crikey that's like back in the 8086 days isn't it ?
    I appreciate your help but, Wish I could work out how to copy/paste those files just using the explorer. That's what it's meant for- ease of use, click and drag. Rarely need to use the cmd in windows these days.
    If I can't get full control over this thing then it's useless. I mean it's only a raspberry pi, It won't be used for emails or surfing , I've got the office computer for that, so security need not be a high priority.
    Just want full access to everything without mucking about with passwords all the time. There must be a way to do that.
    I tend to treat RPi's as networkable appliances - rarely as a desktop machine, and thus a lot of the time I'm in a shell with an ssh connection going, and mc ..albeit looking ancient and archaic...is still one of the best swissarmyknife terminal apps out there imho...anyhoo...

    I see a few more answers from you in this thread, alluding back to a question I asked before -- what do you plan to use the thing for?

    Your problem is not one of dir/file permissions, but that of uid/guid of the directories under /media/pi/Storage

    My best guess, is those directories were create/used by the Libraelec setup ...in which case there's likely nothing wrong, you either need to be root to copy files into /media/pi//Storage/music -or- the pi user needs to be added to whatever group the media server is running under.

    Can you copy files from the USB drive to the desktop they way you want to?

  • Page 2 of 3 FirstFirst 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
    •