User avatar
makem2
Posts: 231
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Permissions problem

Fri Sep 06, 2013 11:38 pm

I have transferred some .mp3 files to the pi and am attempting to rename some.

The files were transferred from a Win7 machine and have filenames with spaces. Not sure if that is relevant.

Path to files is /media/humax/My Music/Sarah Brightman- Classics/xxxxx xxx xxx xxx.mp3

According to file manager permissions the owner is root. I have tried sudo and sudo su with chown root:pi * but cannot change the permissions to allow me to change filenames.

In fact I cannot rename or move any of the video, music or photo files I have transferred from Win7.

Advice please?

flyinghappy
Posts: 115
Joined: Mon Nov 05, 2012 5:31 pm

Re: Permissions problem

Sat Sep 07, 2013 1:01 am

Try

Code: Select all

sudo chown pi:pi -R *
The -R option makes the command recursive so it effects everything inside the folder. If you run

Code: Select all

sudo chown root:pi *
not only are you only changing permissions for only the folder, not everything in it, you are changing ownership from root to root...
Pi with ArchLinux running a minidlna/samba home server

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Permissions problem

Sat Sep 07, 2013 1:03 am

I think the key here is to find out exactly *how* the OP "transferred" the files from Windows.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

oldgrump
Posts: 8
Joined: Sat Aug 17, 2013 6:16 am

Re: Permissions problem

Sat Sep 07, 2013 6:47 am

If you want to issue commands relating to filenames with spaces in them, you must either escape the spaces (put a \ before each space) or put the filename in quotes.

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: Permissions problem

Sat Sep 07, 2013 9:50 am

makem2 wrote:Path to files is /media/humax/My Music/Sarah Brightman- Classics/xxxxx xxx xxx xxx.mp3
Sounds for me a little bit like USB-stick?
makem2 wrote:The files were transferred from a Win7 machine ...
May be the stick is FAT32 or NTFS?

If two times "YES" then you can fight with 'chown' until the end of time! These filesystems do not support linux-permissions, you have to use the correct mount-options.

MfG, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

User avatar
makem2
Posts: 231
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Permissions problem

Sat Sep 07, 2013 10:01 am

FM81 wrote:
makem2 wrote:Path to files is /media/humax/My Music/Sarah Brightman- Classics/xxxxx xxx xxx xxx.mp3
Sounds for me a little bit like USB-stick?
makem2 wrote:The files were transferred from a Win7 machine ...
May be the stick is FAT32 or NTFS?

If two times "YES" then you can fight with 'chown' until the end of time! These filesystems do not support linux-permissions, you have to use the correct mount-options.

MfG, FM_81
The answer is yes, NTFS. Thanks, I will look into mount options.

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: Permissions problem

Sat Sep 07, 2013 10:08 am

makem2 wrote:The answer is yes, NTFS. Thanks, I will look into mount options.
So you can also look at ntfs-3g, but do not await any wonders in speed! :)

MfG, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

RobHenry
Posts: 452
Joined: Fri Sep 21, 2012 9:04 pm
Location: UK

Re: Permissions problem

Sat Sep 07, 2013 5:16 pm

FM81 wrote:do not await any wonders in speed! :)

MfG, FM_81
+1. If the USB stick/drive is only for use on the pi then reformat as ext4 and transfer your files again. File system does not affect network sharing with samba or nfs so you can still use it as a network share with a non-linux system.

User avatar
makem2
Posts: 231
Joined: Tue Jul 02, 2013 9:12 am
Location: Essex
Contact: Website

Re: Permissions problem

Sat Sep 07, 2013 5:27 pm

Actually the drives are 1Tb HD's (2) and they are NTFS. I am using ntfs-3g.

I want to be able to detach a drive and connect it to a new Win7 install when it crashes (note the 'when' lol), to be able to transfer the data.

I could have one ext4 and one NTFS I suppose as both have identical data. That would not really improve things ?

BTW permissions are sorted now.

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: Permissions problem

Sat Sep 07, 2013 5:46 pm

makem2 wrote:I could have one ext4 and one NTFS I suppose as both have identical data. That would not really improve things ?
That depends on your needs/wishes!
If you ever plan to share something in network (SAMBA), then EXT4 can be a much better choice, as said before.
If you didn't plan such and you can live with 'ntfs-3g', then there is no need to change this.
makem2 wrote:BTW permissions are sorted now.
Fine!

MfG, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

Return to “Troubleshooting”