Apache webserver folder permissions

Don´t be shy, Linux is fun! =)
Post Reply
User avatar
visser
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 472
Joined: 03 Apr 2007, 16:00
17
Location: online
Contact:

Apache webserver folder permissions

Post by visser »

This is going to sound very noobish. lol.
u got my apache server up and running on my newly installed ubuntu server :P and i was copying some stuff i had been working on from my usb to my root folder.

i go to access it and it says forbidden. so when i create the folder rather than copy it. it allows me to see the folder but every time i view the stuff in it it wont allow me to see it. once again forbidden.

what do you guys do with your apace server?

G-Brain
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 467
Joined: 08 Nov 2007, 17:00
16
Location: NL

Post by G-Brain »

chmod

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

yeah, for a quick solution:

Code: Select all

chmod -R 777 <foldername>
DON'T do this when your server is available to the public on the net, only for LAN-usage, because you give read/write/execute permissions to anyone that way.
chmod is an essential command in *nix systems, so make sure you understand how it works, start here:
http://en.wikipedia.org/wiki/Chmod

:wink:

User avatar
visser
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 472
Joined: 03 Apr 2007, 16:00
17
Location: online
Contact:

Post by visser »

yea i was reading in some other places about this is well. took me a while tho. thanks guys.

and cuz im curious like a cat (tahts why they call me whiskers) why is it bad to chmod a folder while its on the web (wow noob much lol) and what could happen to my site/what could be done?

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

well, 777 means everybody has the right to read/write/execute anything...what dangers are caused by this depends of course on the source files. if there is just a simple html file it will not cause security risks, but if there are install scripts for example or passwords in a flatfile it would be very dangerous... :wink:

Post Reply