Sponsored Content
Top Forums UNIX for Dummies Questions & Answers File Permissions conflict with Cron Post 302300698 by RexJacobus on Tuesday 24th of March 2009 08:17:13 PM
Old 03-24-2009
File Permissions conflict with Cron

Our site has a page that creates a jpeg graph everytime you load it. I have written a very simple cron job (rm *.jpeg) to delete the graphs once a day. This doesn't happen because the jpegs are owned by nobody:nobody and are write protected.

When I do the job manually I am always asked 'are you sure you want to delete....' which obviously cron doesn't like. If I put a jpeg in the folder that is owned by a standard owner it gets deleted so I know the syntax is correct.

My question is this: Is it easier to change the ownership of jpegs so that they are created with the standard owner or is it easier to make my cron job delete the jpegs even though they are protected?

And how do I go about implementing which ever is easier?

RexJ
 

10 More Discussions You Might Find Interesting

1. HP-UX

To give the "unzip" permissions & "create" file permissions

Hi, I am a Unix Admin. I have to give the permissions to a user for creating new file in a directory in HP-Ux 11.11 system since he cannot able to create a new file in the directory. Thanks in advance. Mike (3 Replies)
Discussion started by: Mike1234
3 Replies

2. UNIX for Dummies Questions & Answers

DNS Conflict

I host a few websites for friends and lately my server has been bogging down at times. I think that it is because of a dns conflict. Someone said that by doing a nslookup I should be able to see it and then do a pkill -9 in.named and then do in.named to get it going again. Any feedback on this... (1 Reply)
Discussion started by: thomi39
1 Replies

3. HP-UX

Conflict between df -k and du -sk...again

Hi, I know this has been discussed a number of time but i could not get the exact answer. So need help again. Issue: The two command for same file system shows different size. du -sk shows toatl size is 12780685 KB while df -k 45289229 used allocated Kb /oxt/mantran/bin $ du -sk... (8 Replies)
Discussion started by: malaya_17
8 Replies

4. Solaris

Conflict with PIDs

I am trying to determine the root cause of a java process that dies trying to startup during it's cron job. I did go ahead and change the time that it starts up in the cron file and now it starts successfully. However is there a way to determine what PID a process was attempting to get when... (5 Replies)
Discussion started by: vedder191
5 Replies

5. Solaris

Solaris 9 IP conflict

Hi Gurus I am in a strange situation. I have a SUN sparc server . The server was having an IP say X..... (this IP X is now being used by another server)..... I have just installed fresh solaris 9 OS on the same server and given new IP say Y. I also configured probe based IPMP with ce0 and... (2 Replies)
Discussion started by: ningy
2 Replies

6. Solaris

IP address conflict

Hi, I am currently working on 2 SPARC-ENTREPRISE T5220 (cluster servers), named SERVER 3A and SERVER 3B. Both servers have their own Ip ADRESS and share 1 Virtual IP adress to share applications....... Both servers are available , but can't communicate together right now. For example, from... (8 Replies)
Discussion started by: feg
8 Replies

7. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

8. Shell Programming and Scripting

Conflict with the operator in IF

I am using a script like this source=$1 if ; then echo "got it" else echo "lost it" fi But the script is giving th error like script.ksh: ==: unknown test operator Can i know , is the syntax iam using is correct or suggest me a good way. ... (3 Replies)
Discussion started by: nani1984
3 Replies

9. Shell Programming and Scripting

Setting default permissions without umask or cron jobs

I've got a number of people sending files to me in different directory structures, and users on many different groups who need access to these incoming paths. My problem is that umask assumes a default of 666 for files. No execute bit, meaning that my users can't even see the incoming folders.... (2 Replies)
Discussion started by: Karunamon
2 Replies

10. Cybersecurity

Cron Logs File Permissions

Are there any security risks in having cron logs readable by all (644)? We have scheduled some jobs and have issues we want to investigate, but this is justification provided in rejecting our request: "Cron log will have only read permission for root, we cannot change the permission to make... (2 Replies)
Discussion started by: MKH
2 Replies
atrm(1) 						      General Commands Manual							   atrm(1)

NAME
atrm - Removes jobs spooled by at SYNOPSIS
atrm [-a] [-f | -i] [job_number...] | [user...] The atrm command removes jobs that were created with the at command. OPTIONS
Removes all jobs belonging to the person invoking atrm. If invoked by a privileged user, all jobs on the queue are removed. Suppresses the printing of all information about the jobs being removed. Prompts before a job is removed; a response of y, or the locale's equivalent of y, causes the job to be removed. Obsolete version of -a. DESCRIPTION
If one or more job numbers is specified, atrm attempts to remove only those jobs. If one or more usernames is specified, all jobs belonging to those users are removed. This form of invoking atrm is useful only if you have superuser authority. EXAMPLES
To remove job number 62169200.a, created by user chinn, from the queue created by the at command, enter: atrm chinn.62169200.a Note that specifies an at job for sh. (.f specifies an at job for csh, and specifies an at job for ksh.) FILES
Main cron directory. List of allowed users. List of denied users. Spool area. Queue description file for at, batch, and cron. SEE ALSO
Commands: at(1), atq(1), cron(8) Files: queuedefs(4) atrm(1)
All times are GMT -4. The time now is 06:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy