You are not logged in.

#1 2008-02-13 12:27:28

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

[SOLVED] can't chmod as root

Trying to set write permission for all on directory /share and file /share/test.

Current permissions:

drwxr-xr-x 4 root root 4096 2008-02-13 13:15 /share
-rwxr-xr-x 1 root root 509 2008-02-13 13:16 /share/test

I tried (as root)

chmod 0777 /share
chmod 0777 /share/test

and

chmod a+w /share
chmod a+w /share/test

No error is returned, but the permissions don't change! Any ideas?

Last edited by bitpal (2008-02-13 15:24:21)

Offline

#2 2008-02-13 13:10:02

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: [SOLVED] can't chmod as root

nfs mount ?


Zygfryd Homonto

Offline

#3 2008-02-13 13:14:53

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] can't chmod as root

No, it's fat32

Offline

#4 2008-02-13 13:21:05

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: [SOLVED] can't chmod as root

man mount ?


Zygfryd Homonto

Offline

#5 2008-02-13 13:24:59

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] can't chmod as root

Do you mean, is it a manual mount? No, it's mounted in fstab.

Offline

#6 2008-02-13 13:58:22

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: [SOLVED] can't chmod as root

I mean: check options in /etc/fstab according to what you want to get
specially for fat there are different options


Zygfryd Homonto

Offline

#7 2008-02-13 14:02:24

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] can't chmod as root

This is my fstab:

none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


/dev/cdrom /mnt/cdrom   iso9660   ro,user,noauto,unhide   0      0
/dev/cdrom1 /mnt/cdrom1   iso9660   ro,user,noauto,unhide   0      0
/dev/dvd /mnt/dvd   udf   ro,user,noauto,unhide   0      0
/dev/fd0 /mnt/fd0   vfat   user,noauto   0      0
/dev/sdb5 /share vfat defaults 0 1
/dev/sdb6 swap swap defaults 0 0
/dev/sdb7 /boot ext2 defaults 0 1
/dev/sdb8 / ext3 defaults 0 1
/dev/sdb9 /home ext3 defaults 0 1

What could be wrong with /share here?

Offline

#8 2008-02-13 14:39:28

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: [SOLVED] can't chmod as root

I am assuming that you are trying to make this folder and the mount readable and writable to non-root users.

Unmount the filesystem as root, then set the group to /share to disk.  Then make sure that the users are part of the disk group. Then set the permissions to 775.

Once you have done this, edit your fstab line so it appears to be something like this:

/dev/sdb5     /share      vfat       auto,group,exec,nosuid      0    0

This should work fine.

Offline

#9 2008-02-13 15:07:07

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] can't chmod as root

I did:

umount /share
chgrp -R disk /share

then set the line in fstab as you said, and rebooted.

The permissions are still read-only for others, and chmod has no effect.

Maybe I should add that this is a samba share - does that make any difference? I thought root has full rights to chmod no matter what?

Last edited by bitpal (2008-02-13 15:15:24)

Offline

#10 2008-02-13 15:19:41

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] can't chmod as root

OK, I solved it. I stopped samba and chmod works.

Makes sense: how can the server change access rights to a share while other machines are reading/writing to it?

Thanks sic and zyghom for your input; I was about to give up on this (letting the windows box write to the share), if you hadn't gotten me to think of all the possibilities!

Last edited by bitpal (2008-02-13 15:23:16)

Offline

#11 2008-02-13 16:16:47

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: [SOLVED] can't chmod as root

did I mention nfs ? did I mean "shared so untouchable" ? :-)


Zygfryd Homonto

Offline

#12 2008-02-13 16:21:58

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] can't chmod as root

zyghom wrote:

nfs mount ?

Sorry, I didn't even know what you meant by nfs (new files system? nt? ntfs?), so I couldn't place your question...

Offline

#13 2008-02-13 16:25:21

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: [SOLVED] can't chmod as root

nfs - network file system ;-)
but you are right: I should have been clear by stating: "shared resource cannot be changed"


Zygfryd Homonto

Offline

#14 2008-02-13 16:34:03

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] can't chmod as root

Thanks for clearing that up.

Can I just continue this with my ACTUAL samba problem? I've been struggling with this for 3 days, trying to get write access to the share from my xp laptop. I can browse the share folder from xp, but I can't edit/change/add files.

Can you help me with this? I'll post my smb.conf if you're willing...

Or should I start a new thread?

Last edited by bitpal (2008-02-13 16:34:36)

Offline

#15 2008-02-13 16:42:42

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: [SOLVED] can't chmod as root

better new, best even first use search cause for sure answer exists here in forum or even in wiki


Zygfryd Homonto

Offline

#16 2008-02-13 17:29:21

bitpal
Member
From: Berlin, Germany
Registered: 2008-02-03
Posts: 46
Website

Re: [SOLVED] can't chmod as root

I did some homework on this, so I started a new thread:

http://bbs.archlinux.org/viewtopic.php?id=43885

Hope to see you there!

Offline

Board footer

Powered by FluxBB