Jump to content

Recommended Posts

Posted

Excuse my ignorance on the matter.

 

I have a CRON job that is set to run every day that establishes an FTP connection to a remote server and downloads a log file. This file grows on a daily basis, and I want the option of just resuming the download everyday instead of downloading the whole thing over, and over, and over again. I can run this script manually each day and it establishes the FTP connection no problem and works its magic without failure. However, if the CRON job takes a stab at it...i get a permissions failure.

 

The problem that I think I have isolated seems to be a possible ownership issue. When I run the PHP script fron CRON it states that it cannot write the file becasue it does not have the proper access. Now, the folder that the file exists in was CHMOD'ed by myself and like I said before, it seems to work fine.

 

My question would be getting to the end result of having my folder (which only has 1 file in it) the proper ownership/access so that this web script that Im running can have write access to make the necessary updates to the file everyday without downloading the whole file again.

 

I dont have any knowledge of the CHOWN command or if that should even be my solution. Ive been searching around the great ol' www and cant put my thumb on my resolution (if there is one). Im left wondering if I need to contact someone at tch support to have my directory/folder have the proper permissions??

 

Any suggestions?

Posted
Excuse my ignorance on the matter.

 

I have a CRON job that is set to run every day that establishes an FTP connection to a remote server and downloads a log file. This file grows on a daily basis, and I want the option of just resuming the download everyday instead of downloading the whole thing over, and over, and over again. I can run this script manually each day and it establishes the FTP connection no problem and works its magic without failure. However, if the CRON job takes a stab at it...i get a permissions failure.

 

The problem that I think I have isolated seems to be a possible ownership issue. When I run the PHP script fron CRON it states that it cannot write the file becasue it does not have the proper access. Now, the folder that the file exists in was CHMOD'ed by myself and like I said before, it seems to work fine.

 

My question would be getting to the end result of having my folder (which only has 1 file in it) the proper ownership/access so that this web script that Im running can have write access to make the necessary updates to the file everyday without downloading the whole file again.

 

I dont have any knowledge of the CHOWN command or if that should even be my solution. Ive been searching around the great ol' www and cant put my thumb on my resolution (if there is one). Im left wondering if I need to contact someone at tch support to have my directory/folder have the proper permissions??

 

Any suggestions?

 

You will have to excuse me again, im a bit brain dead with all this searching im doing. I originally meant "CHOWN" not "CHMOD"...cause I know i can CHMOD.

 

I just saw this post in security...

 

http://www.totalchoicehosting.com/forums/i...=24913&hl=CHOWN

 

and know what to do now...thanks.

Posted

I'm glad you have it sorted :unsure:

 

As a note. The cron job will run as your ID, whilst a PHP from the website will run as nobody... if that makes a difference as to who you want as the owner of those directories

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