SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is it concerned with File Permissions ?

    Hello

    Please note that I am working on a server and my script should creates a FOLDER and under that folder there must be a file created.

    when i run the script, it creates the folder and also creates the file. But the size of the file is 0 and it is always empty.

    When i try to login to FTP then i can see that the folder created was not 777 and I can not delete the file and folders.

    Even though I created a folder with 0777, but still it did not created the folder 777.

    Can anyone please let me know what is likely to be the issue ? is it something with permissions ?

    what permissions a script should have to create folders / copying files in that folder etc etc ??

    thanks
    Zeeshan

  2. #2
    Use The Cloud
    Join Date
    Jan 2006
    Location
    Boise, ID
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Post some code.
    Brad Hanson, Web Applications & Scalability Specialist
    ► Is your website outgrowing its current hosting solution?
    ► PM me for a FREE scalability consult!
    ► USA Based: Available by Phone, Skype, AIM, and E-mail.

  3. #3
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Once your script has created folder and file, it meens that everything is ok with the rights.

    Will be good to post your code

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you pass 0777 when you are trying to create the directory, you need to first do this:
    PHP Code:
    umask(0); 
    See http://php.net/umask and http://en.wikipedia.org/wiki/umask

    You can't change the files on FTP because your website runs under a different user than the user that FTP runs under. You'll need to delete / chmod the files using a script (or you can ask your host).

    For the first issue, you need to post some code.

  5. #5
    if ($zee == "Guru") { $zee--;}
    Join Date
    Nov 2005
    Location
    Karachi - Pakistan
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes you all are correct and I have found the issue.

    Thanks a lot All of you !
    You all are great !


Bookmarks

Posting Permissions

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