Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Security > 777 permission for a folder

Forgot Password?
 Linux Security   Discussion about keeping your machines secure, and the crackers out.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 08-18-2009   #1 (permalink)
Just Joined!
 
Join Date: Mar 2008
Posts: 17
777 permission for a folder

Hi,

I know that it's possible to upload files to a folder with 777 permission. How do i do this ?
Just tried using POST method, but it doen's seems to work...
joemon is offline  


Reply With Quote
Old 08-18-2009   #2 (permalink)
Linux Enthusiast
 
Kieren's Avatar
 
Join Date: Aug 2007
Location: England
Posts: 730
We are going to need some more information such as what language you're using and any code that you may have written
__________________
Linux User #453176
Kieren is offline   Reply With Quote
Old 08-18-2009   #3 (permalink)
Just Joined!
 
Join Date: Mar 2008
Posts: 17
either perl or php would be fine....the code that I have written isn't a long one....just created a socket to connect to a server & then tried uploading it using POST method. But I am not sure how to navigate to the folder which has this 777 permission.
joemon is offline   Reply With Quote
Old 08-18-2009   #4 (permalink)
Linux Enthusiast
 
Kieren's Avatar
 
Join Date: Aug 2007
Location: England
Posts: 730
In PHP it is quite simple. You just upload the file using a HTML form and then use PHP to copy the file to the folder you want to store it in. A tutorial can be found at

PHP File Upload
__________________
Linux User #453176
Kieren is offline   Reply With Quote
Old 08-18-2009   #5 (permalink)
Just Joined!
 
Join Date: Mar 2008
Posts: 17
Hi Kieren,

Thanks for the quick response.....But things aren't that simple....
The above solution requires me to upload the html form & the php page to my account. I should be able to upload a page without using a HTML form which is already uploaded to my account.
joemon is offline   Reply With Quote
Old 08-18-2009   #6 (permalink)
Linux Guru
 
coopstah13's Avatar
 
Join Date: Nov 2007
Location: NH, USA
Posts: 1,756
This isn't possible what you are trying to do, you need to use a file transfer protocol of some kind, and it doesn't have to be FTP it just has to be something enabled on this machine. Otherwise your HTTP server needs to have a form as Kieren suggested.
coopstah13 is offline   Reply With Quote
Old 08-18-2009   #7 (permalink)
Just Joined!
 
Join Date: Mar 2008
Posts: 17
ok thanks....so what is the security problem in having a folder with permission 777. If no one can upload a file or execute files in this folder....then what is the security threat ?
joemon is offline   Reply With Quote
Old 08-18-2009   #8 (permalink)
Linux Enthusiast
 
Kieren's Avatar
 
Join Date: Aug 2007
Location: England
Posts: 730
joemon, I'm quite confused about what you're trying to do. I think you have some web space and you have uploaded or are trying to upload a PHP script and HTML page onto this website?

Normally you would use an FTP client to upload files to your web space but you will need to contact your web space provider for instructions on how to do this

If you have already uploaded the file and are trying to allow users to run it then the HTML page can have 744 permissions and the PHP can have 755 permissions.

If you are trying to use PHP to allow you to upload files to your server then the folder you are trying to upload to will need 766

If you can explain in more detail what you are trying to achieve and where you’re having a problem then I can provide more details
__________________
Linux User #453176
Kieren is offline   Reply With Quote
Old 08-18-2009   #9 (permalink)
Linux Guru
 
coopstah13's Avatar
 
Join Date: Nov 2007
Location: NH, USA
Posts: 1,756
Other users on the machine would be able to manipulate files in your folder since the "everyone" bit is set to RWX, they could access your files, delete them, add new ones, etc.
coopstah13 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 10:27 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2