The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to create a cron job and run in quality system mahantysk HP-UX 2 03-26-2008 02:23 AM
AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log Keith Johnson AIX 0 01-09-2008 08:32 PM
How to create cron job automatically? siegfried Shell Programming and Scripting 0 04-26-2006 01:01 AM
How do I create desktop icons for the shell programs I create??? TRUEST UNIX Desktop for Dummies Questions & Answers 7 05-15-2002 11:40 AM
CHMOD Help!! jarrell UNIX for Dummies Questions & Answers 2 11-05-2000 02:32 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-19-2008
sirj sirj is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 1
create a chmod cron job help please

hi all,

I'm so embarrasingly new; apologies.

So here's my dilemma; files are being uploaded to the server via a php script... this is therefore assigning ownership to 'nobody' rather than the account 'user'.
It's screwing with the permissions and then the owner can't ftp download images that were uploaded through this script.

So what I'm trying to do is create a cron job which will at 2am run through like 4 different folders within the user's account and chmod all of the images within the folder to 644.

Here's an example of what I was told to do:

You will want to use the following commands:

From secure shell as root, run the command:
crontab -e

Then setup a cron job to run hourly with the command 'chown -R $user:$group /home/$user/public_html/$directory' with the correct values for those variables.

- end of example

My question is this... am I going to have to create a cron job for each of the four folders?

Also; in the example the guy said to have the - correct values for those variables...
So, what do I need to change in the command -
'chown -R $user:$group /home/$user/public_html/$directory'

anything with a $ ?

and if it is anything with a $ - what is the group?


thanks in advance for any assistance!
 

Bookmarks

Tags
cron

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:51 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0