You are here: Home » Reply

Reply To: NSLU2/Firefly setup problems



@andyg wrote:

I have run into a roadblock which hopefully someone can help me to unravel. All has been working fine for a while up to now when I have tried to add some new music into my mp3 share. Whatever I try, I get insufficient priveliges warnings when trying to move a folder into the itunes music folder in /mp3. I have changed permissions on the mp3 folder so that users, groups & others all have read, write & execute but to no avail. I think the problem may be at the next level with the permissions on the itunes music folder itself but I can’t for the life of me figure out changing the permissions or indeed the ownership on that directory. here’s a snippet from the telnet session:

# cd /share/flash/data
# ls -l
drwxrwxr-x 3 admin everyone 4096 Aug 1 18:17 TV
drwxrwxr-x 5 admin everyone 4096 Jun 9 09:12 backups
drwxrwxr-x 3 admin everyone 4096 May 24 22:59 dropfolder
2 root root 16384 May 10 18:54 lost+found
drwxrwxrwx 6 admin everyone 4096 Jul 31 20:11 mp3
drwxrwxrwx 2 root root 4096 Aug 1 19:00 mt-daapd
drwxrwxr-x 3 admin everyone 4096 May 22 21:54 public
1 root root 64064 Aug 1 18:58 quota.user
1 root root 64064 Aug 1 18:57 quota.user~
# cd mp3
# ls -l
drwxrwxr-x 2 admin everyone 4096 Jul 28 10:02 Desktop Folder
drwxrwxr-x 4 admin everyone 4096 Aug 1 08:35 Traveling Wilburys
drwxr-xr-x 587 guest everyone 20480 May 21 22:27 iTunes Music
-rwxrw-r-- 1 admin everyone 7415729 May 14 21:27 iTunes Music Library.xml

I have tried all manner of combinations to access the itunes music directory but nothing seems to work:

# chmod go+w itunes music
chmod: itunes: No such file or directory
# chmod go+w iTunes Music
chmod: iTunes: No such file or directory
# chmod go+w iTunes_Music
chmod: iTunes_Music: No such file or directory
# chmod go+w itunes_music
chmod: itunes_music: No such file or directory

and I’m thinking that it’s the designation of that folder as ‘guest’ that’s casuing me the problems, but how do I fix it…?

Any pointers gratefully received!
cheers, andy

the problems with chmod you are getting are from having spaces in the file names. When you type

chmod go+w iTunes Music

It thinks you want to chmod the iTunes directory and the Music directory, neither of which exist, of course.

You want:

chmod go+w “iTunes Music”

to tell it that the space is part of the name, not a separator between arguments.

As far as permissions, I’d do something like this from the /share/flash/data directory:

chown -R admin:everyone mp3
find mp3 -type d exec chmod 2775 {} ;
find mp3 -type d exec chmod 664 {} ;

That changes the owner and group to admin and everyone respectively for everything (recursively (-R)) in the mp3 directory.

After that, it finds all the directories (type -d) in the mp3 directory and changes the permissions to 2775 (more on that in a bit)

Then it finds all the files (type -f) in the mp3 directory and changes the permissions to rw-rw-r. That makes all the files essentially world writable.

You could make that 644 to make it world readable, and writable by admin. Also, you could make it easier to make them owned by you rather than admin, if that’s how you connect via smb to the slug. (chown -R andyg:everyone mp3)

The 2775 is kinda strange. that makes is 775 (rwxrwxr-x), or directories world writable (or 2755, wich andyg:everyone if you only want it world-readable) and the G makes the folders set up so that any files placed in it are owned by the group that drops them in (everyone, in this case). That way when you make a new folder or item, it continues to have the permissions of the parent folder.

If that doesn’t make sense, let me know, and I can expand on it.

— Ron