Find the answer to your Linux question:
Results 1 to 9 of 9
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    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...

  2. #2
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    848
    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

  3. #3
    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.

  4. #4
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    848
    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

  5. #5
    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.

  6. #6
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    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.

  7. #7
    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 ?

  8. #8
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    848
    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

  9. #9
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •