View previous topic :: View next topic |
Author |
Message |
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Mon Jan 13, 2003 12:59 am Post subject: How do i chmod a mounted mount point? |
|
|
I need to set my docroot for apache as dir on a mounted drive, but chmod doesnt take effect when the drive is mounted..
What can i do?
Cheers |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Mon Jan 13, 2003 6:52 am Post subject: |
|
|
Are you issuing the chmod before or after the partition is mounted? _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
spanommers n00b
Joined: 13 Jan 2003 Posts: 26
|
Posted: Mon Jan 13, 2003 7:10 am Post subject: |
|
|
if the drive is fat, you could do a
Code: |
mount -o remount,fmask=*yourmask*,dmask=*yourmask* *yourmount*
|
yourmask is the opposite of what you'd put in chmod, btw. otherwise...i wouldn't know how to change permissions while it's still mounted. except, maybe you could mount -o bind to another directory w/ permissions set up, but that's a kludge of a fix.
somewhat related...can apache's root be a symlink?
EDIT: no bb in code blocks, eh?
EDIT2: oh, i bunged that up. should be fixed now |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Mon Jan 13, 2003 8:36 am Post subject: |
|
|
nope it doesnt work, i have tried it i mounted it aswell it stays as:
drwxr--r-- 16 root root 32768 Jan 1 1970 d |
|
Back to top |
|
|
spanommers n00b
Joined: 13 Jan 2003 Posts: 26
|
Posted: Mon Jan 13, 2003 8:49 am Post subject: |
|
|
aren't those the permissions that you want? everyone can read, including apache. |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Mon Jan 13, 2003 4:16 pm Post subject: |
|
|
I cant chown either
Can any of you chmod a mounted partition?
Quote: | Interimo mnt # chown root:apache d
chown: changing ownership of `d': Operation not permitted
Interimo mnt # whoami
root
Interimo mnt #
|
|
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Mon Jan 13, 2003 4:41 pm Post subject: |
|
|
port001 wrote: | I cant chown either Quote: | Interimo mnt # chown root:apache d
chown: changing ownership of `d': Operation not permitted |
| What is apache d? Why the space? That might be your problem. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Mon Jan 13, 2003 4:45 pm Post subject: |
|
|
Quote: | What is apache d? Why the space? That might be your problem. |
d is the name of my mountpoint as in D:\ |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Mon Jan 13, 2003 4:56 pm Post subject: |
|
|
port001 wrote: | d is the name of my mountpoint as in D:\ | Yes, that should've been obvious.
rac wrote: | Are you issuing the chmod before or after the partition is mounted? |
I think you'll want to make sure you chown the mount point before anything is mounted to it. As it is a windows drive, see the FAQ UN4: mounting Windows partitions (FAT,NTFS) for info on how to mount them. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Mon Jan 13, 2003 6:44 pm Post subject: |
|
|
kanuslupus wrote: | I think you'll want to make sure you chown the mount point before anything is mounted to it. | I think it's the other way around: the chown will only "take" if the partition is already mounted; otherwise, you are chowning the directory on the surrounding partition. Doing the chown after the mount effectively chowns the root directory of the partition. I defer to kanuslupus on the entire Windows issue, which is more likely the cause of your problem, I guess. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
idl Retired Dev
Joined: 24 Dec 2002 Posts: 1728 Location: Nottingham, UK
|
Posted: Mon Jan 13, 2003 7:36 pm Post subject: |
|
|
I got it permissions sorted using umask in fstab, but now i cant get apache to work with the directory. With 1.3.27 it says permission denied, eventhough a normal user in the apache group can navigate and read from the directorys fine. With apache 2.x it gives me a 404 not found, but in error_log the path it is looking for is correct.
No matter what path is give, none want to work outside of its default, and i've been using apache for years
Gonna try using the config from my server so i'll see if i missed anything.
Thankyou for your help everyone! |
|
Back to top |
|
|
|