473,387 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

chown() problems

I just made a simple program to create files; I'm trying to get the hang of basic file manipulations.
Whatever file my program makes, the owner of the file is "www-data," so I can't edit it using my regular server user. I can use root to change the ownership to the server user, but I don't want to do that for every file.
That's why I tried to use chown() to give ownership to the server as soon as the file is made, but I get this error:

"Warning: chown() [function.chown]: Operation not permitted in /home/server/mysite/make.php on line 17"

chown(), chmod(), and chgrp() all apparently need root permissions.
So how do I give PHP the permissions required to use these functions??
Jan 8 '08 #1
2 2408
ideas anyone?
I still can't seem to get it to work...
Jan 8 '08 #2
rpnew
188 100+
ideas anyone?
I still can't seem to get it to work...
Hi,
You can go through this link... this may help you.....
click here

Regards,
RP
Jan 9 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Fronq | last post by:
Hi ! The entire (PHP-) world seems to have the same problem: Many providers let you upload as one user, lets say "ftpuser", yet then apache and your script will run as another user e.g....
2
by: Sean | last post by:
What is meant by: "CHOWN the entire casetracker folder to something that permits the server to write to it, such as apache.apache, or whatever your Webmaster recommends" - is that 700 or 777...Help...
3
by: Oliver | last post by:
Hi, I have a strange problem and I am not sure where to look for the core reason. I have a homepage in php which is working fine since ages and I have now a new server with a fresh Suse 9.1...
6
by: Ask Josephsen | last post by:
Hi NG If I write the following: <?php $file="myfile.JPG"; if ( getmyuid()==fileowner ( $file ) ) { chgrp ( $file, getmygid() ); chown ( $file, getmyuid() );
4
by: Perttu Pulkkinen | last post by:
I have a form handler script that creates a new folder for the files sent in the form. Move_uploaded_file transfers then puts those files there. But problem is that apache becomes automaticly...
14
by: Jim Hubbard | last post by:
Are you up to speed on the difficulties in using the 1.1 .Net framework? Not if you are unaware of the 1,596 issues listed at KBAlertz (http://www.kbalertz.com/technology_3.aspx). If you are...
3
by: James Colannino | last post by:
Hey everyone. I tried to use os.chown() in the following manner: os.chown('filename', 'username', 'groupname') I got an error, and when I googled for this function I realized that I must pass...
5
by: Corky | last post by:
This works: db2 SELECT DISTINCT PROBLEM_OBJECTS.PROBLEM_ID FROM PROBLEM_OBJECTS INNER JOIN PROBLEMS ON PROBLEM_OBJECTS.PROBLEM_ID = PROBLEMS.PROBLEM_ID WHERE INTEGER(DAYS(CURRENT DATE) -...
10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.