Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old December 21st, 2002, 05:11 AM
etones etones is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 236 etones User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 43 m 35 sec
Reputation Power: 6
Lowest Directory Permission

Hi all, im creating a gallery script the script reads need to write images to a dir and delete images (and folders) from this dir.

Whats the lowest chmod (numerically) i can take it to and still have it function. 777 isnt the best

Thanks to all
Taz

Reply With Quote
  #2  
Old December 21st, 2002, 07:00 AM
telex4's Avatar
telex4 telex4 is offline
Wacky hack
Dev Shed Novice (500 - 999 posts)
 
Join Date: Apr 2001
Location: London, England
Posts: 512 telex4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 25 m 29 sec
Reputation Power: 8
It depends on how your web server is set-up... so for example:

755 (rwx r-x r-x) would work if it was the directory owner that was writing to itnd you wanted any user to be able to list its contents (no biggie).

775 (rwx rwx r-x) would work if the user writing to the directory was in its group.

And so on... to work out the permissions you want, first have a look at: http://snap.nlc.dcccd.edu/learn/madden/intro/perms.html

And then, experiment to work out what will work best on your host

Reply With Quote
  #3  
Old December 21st, 2002, 09:27 AM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
The other thing you'll want to do is pick up on the security concerns this script is going to introduce (you're running this from the web?). What language are you using to write the script?

Reply With Quote
  #4  
Old December 21st, 2002, 11:10 AM
etones etones is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 236 etones User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 43 m 35 sec
Reputation Power: 6
Hi, its written in PHP. Its pretty secure i think, only image files are saved depending on there headers, everything else is discarded. What else can I do?

Cheers
Taz

Reply With Quote
  #5  
Old December 22nd, 2002, 04:26 AM
nikunj nikunj is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Location: Pune, Maharashtra, India
Posts: 86 nikunj User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Make sure you do not give 777 permissions to the directory unless you really require it. If you are running this PHP script from APACHE the permission should be some thing like this:

drwxr-xr-x 2 apache apache 1024 Dec XX XX:XX images

If your webserver runs as apache user and apache group.
__________________
Nikunj
MYSQL/PHP/XML
** Expertise comes with experiece ** Nikunj

Reply With Quote
  #6  
Old December 22nd, 2002, 05:41 AM
etones etones is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Posts: 236 etones User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 43 m 35 sec
Reputation Power: 6
My users will most likely not be proficient enough to set this up via ssh/telnet. Will they be able to apply these chmod's via ftp, or will doing so make the permissions only apply for there user account?

Cheers
Taz

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > Lowest Directory Permission


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway