Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do i chmod a mounted mount point?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Mon Jan 13, 2003 12:59 am    Post subject: How do i chmod a mounted mount point? Reply with quote

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
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Mon Jan 13, 2003 6:52 am    Post subject: Reply with quote

Are you issuing the chmod before or after the partition is mounted?
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
spanommers
n00b
n00b


Joined: 13 Jan 2003
Posts: 26

PostPosted: Mon Jan 13, 2003 7:10 am    Post subject: Reply with quote

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
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Mon Jan 13, 2003 8:36 am    Post subject: Reply with quote

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
View user's profile Send private message
spanommers
n00b
n00b


Joined: 13 Jan 2003
Posts: 26

PostPosted: Mon Jan 13, 2003 8:49 am    Post subject: Reply with quote

aren't those the permissions that you want? everyone can read, including apache.
Back to top
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Mon Jan 13, 2003 4:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Mon Jan 13, 2003 4:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Mon Jan 13, 2003 4:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Mon Jan 13, 2003 4:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Mon Jan 13, 2003 6:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
idl
Retired Dev
Retired Dev


Joined: 24 Dec 2002
Posts: 1728
Location: Nottingham, UK

PostPosted: Mon Jan 13, 2003 7:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum