Jump to content

Permission Denied Error


sylvest

Recommended Posts

One of my scripts has stopped working. I have the following code in the file /home/****/gc/functions.php:

 

$logfile = "/home/****/logs/tickets.log";

 

function logopen()

{

global $logf,$logfile;

if (isset($logfile) and ($logfile != ""))

{

$logf = fopen($logfile, 'a');

}

}

 

This fails with the following:

 

Error code: 2

Error message: fopen(/home/****/logs/tickets.log) [function.fopen]: failed to open stream: Permission denied

Script name and line number of error: /home/****/gc/functions.php:36

Variable state when error occurred: /home/****/logs/tickets.log

 

The file /home/****/logs/tickets.log exists, and has permissions 644

The directory /home/****/logs has permissions 775

I am not out of disk space.

 

Can anyone suggest why this has stopped working? I have not used it for a couple of months, but it used to work...

 

Thanks - Rowan

Edited by TCH-Bruce
removed user cPanel name - Please don't post that info in an open forum!
Link to comment
Share on other sites

I can see the owner name in my FTP client (CuteFTP).

B*** Microsoft - why can't they get anything right? :-)

 

I discover that using BeyondCompare (the only FTP client that I've got installed apart from Windows Explorer), I can see an owner property that's set to a number. Most things on my site are set to 32191. The offending file is set to 99.

 

How do I know what these numbers mean?

 

What could have changed the ownership of the file tickets.log from 32191 to 99?

 

How do I change it back again? Although BeyondCompare can show me the owner, it doesn't seem to allow me to change it.

 

Thanks - Rowan

Link to comment
Share on other sites

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...