LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-28-2009, 11:50 AM   #1
Dfangs
LQ Newbie
 
Registered: May 2009
Posts: 2

Rep: Reputation: 0
Question Crontab permission denied while making a directory in user's home


hi all,

i'm a newbie and ws working on crontab and had a problem..

I want to create a directory in a user's home directory at a particular time (only when the user's logged in.)

so i used crontab from root..

# crontab -u <user name> -e

it open a editor with cron for that user

i write..

20 10 * * * mkdir /home/<username>/dir

when i log in as user, at 10:20 i get a mail as...

Permission denied....

i checked cron.deny file there is no user added there so can some one tell me what i'm doin wrong??

Tnks
 
Old 05-28-2009, 01:57 PM   #2
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
Quote:
Originally Posted by Dfangs View Post
hi all,

i'm a newbie and ws working on crontab and had a problem..

I want to create a directory in a user's home directory at a particular time (only when the user's logged in.)

so i used crontab from root..

# crontab -u <user name> -e

it open a editor with cron for that user

i write..

20 10 * * * mkdir /home/<username>/dir

when i log in as user, at 10:20 i get a mail as...

Permission denied....

i checked cron.deny file there is no user added there so can some one tell me what i'm doin wrong??

Tnks
Can you mkdir /home/<username>/dir as the user normally (e.g. outside of cron)?

- Arch
 
Old 05-29-2009, 06:57 AM   #3
Dfangs
LQ Newbie
 
Registered: May 2009
Posts: 2

Original Poster
Rep: Reputation: 0
yeah i can make directory using::

mkdir /home/<username>/dir

problem is there with only one user

i tried the same thing with another user it worked.

i checked the permission of user's home directory there are no modifications in them .
 
Old 05-29-2009, 09:44 AM   #4
archangel_617b
Member
 
Registered: Sep 2003
Location: GMT -08:00
Distribution: Ubuntu, RHEL/CentOS, Fedora
Posts: 234

Rep: Reputation: 42
Please show "ls -ld /home/<username> /home/<username>/dir" and "crontab -lu <username>"

Thanks,
- Arch
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS problem: "Could not chdir to home directory /home/USER: Permission denied" sumanc Linux - Server 4 07-22-2010 04:12 PM
Crontab - permission denied moreni Linux - General 3 10-23-2009 01:43 PM
permission denied to home directory ekdya Debian 3 11-08-2005 04:24 PM
Permission problems when removing user's home directory. davethegenius Linux - Software 3 08-11-2005 04:01 PM
crontab failure: permission denied trying to run script hedpe Linux - Software 5 05-03-2005 07:07 PM


All times are GMT -5. The time now is 09:10 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration