473,386 Members | 1,997 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,386 software developers and data experts.

Permission denied?

I am trying to make a new file using fopen, but I got a exception:
failed to open stream: Permission denied in tmp/ ..

I am using linux and I've already chmod the php file to 777.

I tried adding exec("touch afile") in my php program and the result is
there is no exception but no file come out.

I am confused? how to control the permission in PHP?
Thanks a lot

fAnS.

Oct 17 '06 #1
3 1807
fAnSKyer wrote:
I am trying to make a new file using fopen, but I got a exception:
failed to open stream: Permission denied in tmp/ ..

I am using linux and I've already chmod the php file to 777.

I tried adding exec("touch afile") in my php program and the result is
there is no exception but no file come out.

I am confused? how to control the permission in PHP?
Thanks a lot

fAnS.
Do you have permission to create files in tmp/? If this is being done
on a web page, that would be the userid the webserver is running under.

What's the actual fopen() you are using?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Oct 17 '06 #2
fAnSKyer wrote:
I am trying to make a new file using fopen, but I got a exception:
failed to open stream: Permission denied in tmp/ ..

I am using linux and I've already chmod the php file to 777.

I tried adding exec("touch afile") in my php program and the result is
there is no exception but no file come out.

I am confused? how to control the permission in PHP?
Thanks a lot

fAnS.
did you use chmod 777 on tmp dir by ftp or php ?
Oct 17 '06 #3
thanks a lot
it is because the permission for the tmp

Sorry for such a stupid question :)

Cheers
FanS.
Gale wrote:
fAnSKyer wrote:
I am trying to make a new file using fopen, but I got a exception:
failed to open stream: Permission denied in tmp/ ..

I am using linux and I've already chmod the php file to 777.

I tried adding exec("touch afile") in my php program and the result is
there is no exception but no file come out.

I am confused? how to control the permission in PHP?
Thanks a lot

fAnS.

did you use chmod 777 on tmp dir by ftp or php ?
Oct 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Klunk | last post by:
Hi, last week I moved the folder of my Intranet application to another disk of the same server. After this change all the ASP page return this error: Microsoft VBScript runtime error...
6
by: Jon Montana | last post by:
CDONTS was working well until I installed Exchange 2000. I thought it might be a relay problem, but I allowed the server IP address to relay. Thanks for anything you can offer. here's the...
1
by: Mark E. Hamilton | last post by:
Sorry, I probably should have re-stated the problem: We're using Python 2.3.5 on AIX 5.2, and get the follow error messages from some of our code. I haven't yet tracked down exactly where it's...
10
by: Florian G. Pflug | last post by:
Hi I installed a postgres-application (which was developed on debian woody) on red hat 9 today, using the postgres 7.3 rpms from redhad. One of my the triggers uses the pg_settings table (more...
2
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some...
4
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
0
by: private.anders | last post by:
Hi David! Really need assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
0
by: private.anders | last post by:
Really need your assistance since I have been struggling with a problem long time now. I am running a web application on a Win 2003 Std (Active Directory). Everything works fine. I have...
4
by: xzzy | last post by:
I have a v1.1 web app that works on my local computer. However, running it at the host computer, the following breaks: when a viewer selects a different country, the State dropdown should...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.