
09-07-2004, 11:58 PM
|
|
Web Hosting Guru
|
|
Join Date: Jan 2004
Location: NJ, USA
Posts: 288
|
|
Not chmodding. Please help
Aight I'm having a problem. I'm making a directory from a $_POST and it's protected and all, however once it is created, the proper CHMOD isn't correct, nor even any number at all, it's set to 0.
I've tried: mkdir($_POST['username'] , 0777);
I've also tried:
mkdir($_POST['username']);
chmod($_POST['username'] , 0777);
AND system(chmod 0777 , $_POST['username']);
And I can't even change the created directory through FTP. Please help.
|

09-08-2004, 12:47 AM
|
|
New Member
|
|
Join Date: May 2003
Posts: 4
|
|
set corresponding umask before you create a dir
if you need 0x777, then
umask(0000);
mkdir('ur_dir', 0777);
that can help
|

09-08-2004, 12:59 AM
|
|
Web Hosting Guru
|
|
Join Date: Jan 2004
Location: NJ, USA
Posts: 288
|
|
Wow this is seriously messed up:
Warning: mkdir(artic): Permission denied in /home/virtual/site3/fst/home/myimg/public_html/functions.php on line 106
So basically I can't do jack? I own the server and administer everyhitng, how could this be??? 
|

09-08-2004, 02:49 AM
|
|
Community Guide
|
|
Join Date: Jul 2003
Location: Kuwait
Posts: 5,100
|
|
It means that Apache doesn't have the proper rights to change permissions. If you chown the files to the apache user, the permission errors should go away.
__________________
In order to understand recursion, one must first understand recursion.
If you feel like it, you can read my blog
Signal > Noise
|

09-08-2004, 07:17 AM
|
|
Web Hosting Evangelist
|
|
Join Date: Nov 2002
Posts: 510
|
|
is the directory /home/virtual/site3/fst/home/myimg/public_html/ chmoded to 0777 ?
and the php is compiled as an apache module right ??
|

09-08-2004, 10:03 AM
|
|
Web Hosting Guru
|
|
Join Date: Jan 2004
Location: NJ, USA
Posts: 288
|
|
Quote:
Originally posted by Mike_R
is the directory /home/virtual/site3/fst/home/myimg/public_html/ chmoded to 0777 ?
and the php is compiled as an apache module right ??
|
Yes and I believe so.
|

09-08-2004, 01:46 PM
|
|
Web Hosting Guru
|
|
Join Date: Jan 2004
Location: NJ, USA
Posts: 288
|
|
Um my webhost guy says when php creates a folder, it goes to the root account permissions. So only the root account can change the CHMOD on it. I don't get it. I mean wtf is the point of mkdir() if you can't set the permissions correct if you are using a user.... 
|

09-08-2004, 02:11 PM
|
|
Disabled
|
|
Join Date: Aug 2004
Location: India
Posts: 48
|
|
What is the uid and gid of the directory that was created?
|

09-08-2004, 02:23 PM
|
|
Web Hosting Guru
|
|
Join Date: Jan 2004
Location: NJ, USA
Posts: 288
|
|
I'm sorry but whats a uid and gid?
If your asking this account isn't the root directory.
|

09-15-2004, 10:59 AM
|
|
Disabled
|
|
Join Date: Aug 2004
Location: India
Posts: 48
|
|
That's the user and group of the directory. You can find this by:
Code:
ls -ld /path/to/dir
|

09-15-2004, 03:44 PM
|
|
Web Hosting Guru
|
|
Join Date: Jan 2004
Location: NJ, USA
Posts: 288
|
|
What difference will this do? This acconut is the root account 
|

09-16-2004, 11:04 PM
|
|
Disabled
|
|
Join Date: Aug 2004
Location: India
Posts: 48
|
|
But, since you are executing the php script via apache, then the php won't be running as root.
|
Related posts from TheWhir.com
|
| Title |
Type |
Date Posted |
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|