Jump to content

[SOLVED] New Directories have Incorrect Permissions


Edward

Recommended Posts

 

Hi,

 

I'm building an FTP site. I am manually creating my root folder via an FTP programme and setting the permissions to 777 (which I believe is required). When I check who the owner of this folder is, its 32414 (As far as I'm aware, I don't need to take any notice of what this means). I have a form on the site which people can fill out to create new directories, which will result in the following code being run:

 

if ($result_folder = mkdir($path.$id, 0777)) {
				# if the new folder was created, do this:
				$file = 'index.php';
				$file_copy = $path.$id.'/index.php';
				copy($file, $file_copy);
				echo '<p>Thank you '.$creater.', the folder \''.$name.'\' has been created.</p>';
				echo '<p>Would you like to <a href="add_a_folder.php">add another folder</a>?</p>';
			}

 

When this is done, I notice that the actual permissions of the new subdirectory are not 777, but instead are 755, the owner is 99. This means that I can't manually delete the folder via my ftp programme and my domain will become untidy and crowded. Do you know how to get the correct permissions to be setup, and if I need to specify who the owner is?

 

Thank you in advance.

 

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.