loopyloo (24-08-21)
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.
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
loopyloo (24-08-21)
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.
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.
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
....copy files as root to the target directory..Code:sudo su
...change ownership of the files to the pi user...Code:cp /path/to/some/filename.mp3 /media/pi/Storage/music/
...exit root user...Code:chown pi /media/pi/Storage/music/*
...and you should be able to play those files as user piCode:exit
loopyloo (24-08-21)
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.
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.
loopyloo (24-08-21)
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
loopyloo (24-08-21)
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.
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
loopyloo (24-08-21)
Likely because you're copying as root in the shell, but logged in using the file manager (GUI) as user pi ..But why can't I copy files using the file explorer ?
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.
loopyloo (24-08-21)
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 =)
loopyloo (26-08-21)
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.
is there a reason you installed rasbian ??
i prefer the full ubuntu setup on mine easier to work with
loopyloo (28-08-21)
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.
loopyloo (28-08-21)
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?
Bookmarks