hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : what is bad if I leave 777
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

what is bad if I leave 777

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 04-16-2007, 03:54 AM
Glostar Glostar is offline
WHT Addict
 
Join Date: Apr 2007
Posts: 160
Question

what is bad if I leave 777


Website script requires to put permission from 777 to 644 after all job will be done.
but as i need permanently changes in files, i wand just leave it 777.

Can i leave 777 ? and please if i do this is bad with 777 and how it damage website?

Reply With Quote


Sponsored Links
  #2  
Old 04-16-2007, 06:26 AM
amr922 amr922 is offline
Junior Guru Wannabe
 
Join Date: Dec 2004
Posts: 34
777
means
owner,group,world
can read,write,execute in this folder
thats mean any php script or another script can write and execute in this folder



Regards ,

__________________
Amr
http://www.Venatra.com
Venatra.com .:. Specializing in VPS Hosting

Reply With Quote
  #3  
Old 04-16-2007, 06:48 AM
bueno bueno is offline
Web Hosting Guru
 
Join Date: Dec 2002
Posts: 269
if you are not securing your sever well, it's better to avoid 777

Reply With Quote
Sponsored Links
  #4  
Old 04-16-2007, 07:16 AM
Glostar Glostar is offline
WHT Addict
 
Join Date: Apr 2007
Posts: 160
Quote:
Originally Posted by amr922 View Post
777
means
owner,group,world
can read,write,execute in this folder
thats mean any php script or another script can write and execute in this folder



Regards ,
but can website visitor change files or folder content without login? FTP ot control panel?

Reply With Quote
  #5  
Old 04-16-2007, 07:19 AM
Glostar Glostar is offline
WHT Addict
 
Join Date: Apr 2007
Posts: 160
Quote:
Originally Posted by bueno View Post
not securing
why it is not secure? what can visitors do bad?

Reply With Quote
  #6  
Old 04-16-2007, 07:35 AM
macooper macooper is offline
Junior Guru
 
Join Date: Mar 2004
Location: UK
Posts: 213
It depends on your situation. If you are on a shared host, it means anybody else on that server can upload to your webspace, including uploading scripts for sending spam, worms and other nasties.

It really means that your site is as secure as the least secure script on the server, so you are dependent on other people using the same server keeping all their scripts upto date.

Also, someone could overwrite your configuration settings breaking whatever script it is the config for.

__________________
Martin

Reply With Quote
  #7  
Old 04-16-2007, 07:55 AM
amr922 amr922 is offline
Junior Guru Wannabe
 
Join Date: Dec 2004
Posts: 34
Quote:
Originally Posted by Glostar View Post
but can website visitor change files or folder content without login? FTP ot control panel?

i mean any php script can upload and execute in this folder


(world = all users on your system )





Regards ,

__________________
Amr
http://www.Venatra.com
Venatra.com .:. Specializing in VPS Hosting

Reply With Quote
  #8  
Old 04-16-2007, 08:06 AM
Glostar Glostar is offline
WHT Addict
 
Join Date: Apr 2007
Posts: 160
Quote:
Originally Posted by amr922 View Post
i mean any php script can upload and execute in this folder

(world = all users on your system )
what does it mean "world"? website visitors from outside ? or all other users who has ftp accounts with me?

Reply With Quote
  #9  
Old 04-16-2007, 08:10 AM
bear bear is online now
Community Leader
 
Join Date: Oct 2002
Location: cognito
Posts: 17,276
Anyone. On the server, visiting from anywhere in the world...anyone.

__________________
Have problems (don't we all)? Head over to the help desk
If at first you don't succeed, that's one data point.


Reply With Quote
  #10  
Old 04-16-2007, 08:14 AM
Glostar Glostar is offline
WHT Addict
 
Join Date: Apr 2007
Posts: 160
Quote:
Originally Posted by bear View Post
Anyone. On the server, visiting from anywhere in the world...anyone.
"visiting from anywhere in the world" really ? can change/ delete files in directory with http protocol ? it is unbelievable ?

Reply With Quote
  #11  
Old 04-16-2007, 08:20 AM
amr922 amr922 is offline
Junior Guru Wannabe
 
Join Date: Dec 2004
Posts: 34
every page users opening open apache process with apache user
i mean any process can access read,write and execute in this folder
thats mean any php scripts on server can access this folder

regarding ftp accounts yes they can access it but chroot fixing that if it enabled

sorry for my English
Regards ,

__________________
Amr
http://www.Venatra.com
Venatra.com .:. Specializing in VPS Hosting

Reply With Quote
  #12  
Old 04-16-2007, 10:17 AM
SPaReK SPaReK is offline
Web Hosting Master
 
Join Date: Apr 2002
Posts: 644
Quote:
Originally Posted by macooper View Post
It really means that your site is as secure as the least secure script on the server, so you are dependent on other people using the same server keeping all their scripts upto date.
This is probably the best way to describe this.

Directories that have permissions of 777 are generally fine, if every single account on your server keeps each of their individual scripts up-to-date and free of any exploits. In practice, this is not seen very often. You would also have to have some semblance of trust with all users on the server.

A directory that is set to 777 means that any user on the server would be able to write or create files in that directory. Outside users would not be able to, unless they are exploiting a script somewhere on the server (see above paragraph).

If you are running a server and you are only hosting 1 single account on that server, then issues with 777 directories become less of an issue. This is because if you fail to keep your scripts up-to-date, you only have one person to blame, the owner of that account. That script might become exploitable, but again, that is the problem that the account owner should have taken care of.

For example, if you are running mod_php (PHP as an Apache module) then PHP will run as the Apache user (commonly nobody). If there is just one account on the server, username bob, then if that account has a gallery script that requires 777 directories and has another script that is not being kept up-to-date, then when that script is exploited, an outside user would be able to exploit that script and write to those 777 directories pertaining to the gallery script.

If PHP is running as CGI, then PHP scripts would be executed as the bob user. Directories would not need to be 777, because directories would be owned by the bob user and directories that are owned by bob and have permissions of 755 would have sufficient permissions to handle PHP uploads. However, if the second script was exploited, then that PHP exploit would be running as the bob username as well, and it would be able to write to files anywhere on the bob account.

Probably if you are running a dedicated hosting account, a server with just one account and that is it, running mod_php is your best option. Mod_php will likely give you better performance and while you will have to have 777 directories, as long as you keep the scripts on the account up-to-date (like everyone should do) then it should not pose a problem, certainly no advantage in using PHP as CGI.

If you are on a shared hosting environment, where a server hosts many accounts, then the same cannot be said. In that case, PHP as CGI is probably best. Otherwise a PHP exploit on john's account on the server could be used to write files to bob's gallery 777 directories.

Reply With Quote
  #13  
Old 04-16-2007, 10:41 AM
brianoz brianoz is offline
Web Hosting Master
 
Join Date: Nov 2004
Location: Australia
Posts: 1,439
Mode 777 is asking for trouble - and that's something you don't need to do, there's no reason to leave it that way. Listen to what Sparek's well written post said much better than I can

Reply With Quote
  #14  
Old 04-16-2007, 08:52 PM
Timeprism Timeprism is offline
WHT Addict
 
Join Date: Sep 2006
Posts: 129
777 means anyone who has access to your server can read, write, execute, do bad stuff in that folder.

Reply With Quote
  #15  
Old 07-31-2007, 03:00 PM
vivianmark vivianmark is offline
Junior Guru Wannabe
 
Join Date: May 2007
Posts: 34
Wordpress 777 wp-content

I am running Wordpress, there is a folder (wp-content) with 777.

Is there any danger with 777? Am I safe from hacking by other users as I am on a shared hosting.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Super Charge Your Trial Program Blog 2013-05-16 09:48:11
Cloud Expo 2012 Silicon Valley Web Hosting Events 2012-08-17 14:58:07
Entrust Leaves CA/Browser Forum, Cites New IP Rights Policy Web Hosting News 2012-08-10 16:08:45
Cloud Expo 2012 East Web Hosting Events 2012-04-25 11:18:07
Google's Strategy for 111 8th Avenue Space Could Leave Web Hosts Looking Elsewhere Web Hosting News 2011-06-06 14:31:38


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?