Jump to content

Delete Folder made with mkdir


barkster

Recommended Posts

I've was trying to delete some folders that were created using mkdir and I'm unable to delete any of them with using sftp, ftp or through cpanel file manager.  If I create a new folder with ftp in the same dir I can delete it but still cannot delete folders that were created with mkdir.  I cannot change permission on them either. 

 

Here is the command I'm using.

 

if(!file_exists("Gallery/".$userID)) mkdir("Gallery/".$userID);

Link to comment
Share on other sites

I know how to do those my problem is that I'm not able to change permissions on the folders through any means after they are created nor am I able to delete. 

 

chmod & rmdir do not work if I create the directory through mkdir.  I know it has to do something apache or php group creating it. Thus it won't let me modify it.

Link to comment
Share on other sites

This is what my host said.

 

This is because PHP is running commands using the "nobody" username, while your permissions are for "usernameremoved"

 

You'll need to convert to PHPsuExec to get this fixed up. Changing over to PHPsuExec can break some sites if they have .htaccess with php flags in it. Read this for more information: https://www.power360hosting.com/support/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=16&nav=0,3,14

 

When you're ready we can recompile Apache for you with PHPsuExec. I've gone ahead and fixed the permissions for the directories already there. Also, when you convert to phpsuexec, your scripts can't be more than 755 (so 777 will not work).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.