LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   chmod won't change the file permissions (https://www.linuxquestions.org/questions/linux-newbie-8/chmod-won%27t-change-the-file-permissions-259218/)

midtown266 11-25-2004 11:53 AM

chmod won't change the file permissions
 
Hello all, Ive had Slackware for a little bit now, and heres my problem, ive got a W95 partition w/ all of my music on it, and I cannot change the file permissions w/ chmod nor can I change the ownership w/ chown.

bash-2.05b# ls -l
total 64
-rwxr--r-- 1 root root 77 2004-08-28 19:09 Desktop.ini
drwxr--r-- 354 root root 32768 2003-10-20 07:07 music
bash-2.05b# chmod 755 ./music
bash-2.05b# chown weitzel ./music
chown: changing ownership of `./music': Operation not permitted
bash-2.05b# ls -l
total 64
-rwxr--r-- 1 root root 77 2004-08-28 19:09 Desktop.ini
drwxr--r-- 354 root root 32768 2003-10-20 07:07 music


Im trying to set up a share of my music over our home network, but nobody can execute the mp3's, which means that noone can listen to the music.
I would like to change the permissions of the folder music to 755, but it wont do it in the terminal, and the boxes just uncheck right away if you check them in the gui.

The rest of the fam has winblows :-(

Thanks for your help in advance :-)

P.S. They won't change from winblows either, so thats not a viable solution :-P ;-)

65_289 11-25-2004 12:04 PM

2 questions for you:

1. Why do you need execute permissions on mp3's? Is read access not enough? On my computer, I can play mp3's with just read access for the files.

2. Are you root whenever you try to change the permissions?

samel_tvom 11-25-2004 12:14 PM

well, you can't change the permissions on fat because the file system doesn't support it. So if you have a fat-partition in /mnt called fat you can change the permissions ON the directory but not the directories and files IN it.

So what permissions you set on /mnt/fat will be on the whole partition, so you can't have special permissions for /mnt/fat/music

chmod 755 /mnt/fat would probably work, and if it doesn't: umount the partition, set chmod 755 and mount it on again =)

midtown266 11-26-2004 03:24 PM

thanks all,
read someplace that you would need to execute the mp3s, but I may not have to, thanks for your replies,

I did the chmod on the folder after i unmounted it, then i mounted it, and it chnaged it back to 744, when it was unmounted again, it automatically changed to 755 again :-P ill just try to find another way around it :-) i think its probably the way i have samba set up :-) thanks all again, ill post when i get it worked out if i remember :-P

peace all

btmiller 11-26-2004 03:47 PM

Try setting umask=000 in the options in your fstab file. Be carefull though, as this will give every user on your machine all priviliges on that partition.

midtown266 11-26-2004 06:26 PM

thanks, havent tried that yet, but do you think that that would solve this problem?

when i try to access my music folder through samba, I enter my username and password in the popup, and it dissappears, so I know that the information is correct, because when the information is incorrect, it just pops up another box with clear fields.
When this happens, this message pops up

The folder contents could not be displayed.
"music" couldn't be found. Perhaps it has recently been deleted.

im trying to connect with just a plain user name, it works when i use root, but not the plain user, would this be because of the permissions, which are 744?, or do i have to configure my smb.conf differently than this?

# Global parameters
[global]
workgroup = family
netbios name = LinXBox
encrypt passwords = yes
null passwords = yes

[music]
path = /root/hde5/music/music
browseable = yes
read only = yes

egag 11-26-2004 07:33 PM

it's your fstab entry; should be smth. like :

/dev/hda1 /win-c vfat rw,users,umask=022 1 0

unmount the part., edit fstab and remount.

egag

midtown266 11-26-2004 08:02 PM

Thanks for the reply,

I changed the fstab, and the permissions are now changed, so that did work, but it still comes up with the same error message as before, but only with the user, not root, just as earlier, so I think that it is not a problem with the permissions :-( its something else, probably something to do with the samba configuration that I have, I'm seriously lost so if ya'll could continue with your excellent help :D :D

Thanks again :D :jawa:

egag 11-26-2004 09:25 PM

well.... then i guess you'll need : " umask=002 ".
that give's users all permissions.

egag

btmiller 11-26-2004 10:24 PM

Actually, umasks are permissions DENIED, so a umask of 002 means deny write permissions to users not in the owner or group of the file. A umask of 000, as I stated, gives all users all permissions.

But as the OP said, it's unlikely to be a permissions problem at thgis point. Midtown, can you post the apropriate section(s) of your smb.conf file so we can see what your Samba config looks like?

midtown266 11-27-2004 09:35 AM

This is my whole smb.conf

Code:

# Global parameters
[global]
  workgroup = family
  netbios name = LinXBox
  encrypt passwords = yes
  null passwords = yes

[music]
  path = /root/hde5/music/music
  browseable = yes
  read only = yes

I am trying to make the folder music accessible by user1.
My harddrive partition hde5 is mounted into the folder /root/hde5

thanks again for stickin with me through all this.

egag 11-27-2004 10:51 AM

don't mount it under /root, that's root's home only accessable by root.

egag

midtown266 11-28-2004 07:46 PM

it worked!!! thanks everyone for your help

mounted it under /mnt/hde5 instead of /root/hde5 :D thanks all again, all help is very much so appreciated :-D

thank you and have a great DAY/WEEK/MONTH/YEAR/LIFE!!! WHOOO!! :-) :-P

midtown


All times are GMT -5. The time now is 11:48 PM.