Announcement

Collapse
No announcement yet.

chown() dirs?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • chown() dirs?

    how do i use the chown() function when creating directories so that the dir's can be deleted, uploaded to, etc, using ftp after creating the dir's with the php script?

    i've been using mkdir() but I get permission errors when trying to delete the dirs using ftp.
    any help?

  • #2
    chown() can only change the user/group of other users files if its done by root.

    You need to check what user/group your webserver is running as and then compare it to whatever user you are logging in with ftp.

    Best thing to do is to read up on chmod, your directory permissions could be set any number of ways.

    Comment


    • #3
      yeah i know that.
      That's why I need to use it.
      The permissions are set fine using chmod, but the owner needs to be set so that i can manage the dirs/files via ftp. How is that done?

      Comment


      • #4
        Well you cant change it unless apache is running as root.
        Or the apache user has been given permission via sudo.
        But thats a bd idea.
        Only root gets to change the user/group of someone elses files.

        Comment


        • #5
          thanx

          ok thanx
          I guess I'll just have to write a script to remove the files/dir's that i want removed.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X