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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT SUSE
pilot-foto
pilot-foto(1) PILOT-LINK pilot-foto(1)
NAME
pilot-foto - Palm 'Foto' Image Installer/Remover/Fetcher/Converter
SECTION
pilot-link: Userland conduits
SYNOPSIS
pilot-foto [-p|--port <port>] [--version] [-?|--help] [-q|--quiet] [--usage] [-d|--delete] [--delete-all] [-i|--install] [-l|--list]
[-f|--fetch] [-F|--fetch-all] [-c|--convert]
DESCRIPTION
This is a palm conduit to fetch, install, or remove, Foto files from a Palm. It can also convert *.jpg.pdb files that have already been
fetched from the Palm to jpeg files.
Delete all, or named fotos from handheld.
Install one, or many jpeg images to handheld.
List all jpeg files and thumbnails on handheld.
Fetch all jpeg files, or certain ones by name.
Tries to detect if a file really is a jpeg and refuses to install it, if it is not.
pilot-foto allows you to do multiple operations in one sync. For instance, delete test.jpg and install test.jpg.
USAGE
pilot-foto -p <port> [options] file
OPTIONS
pilot-foto options
-d, --delete
Delete a jpg file on the handheld
--delete-all
Delete ALL jpg files on the handheld
-i, --install
Install a jpg file
-l, --list
List all photos and thumbnails
-f, --fetch
Fetch files from the Palm
-F, --fetch-all
Fetch ALL jpg files from the Palm
-c, --convert
convert [file].jpg.pdb files to jpg
Conduit Options
-p,
--port port
Use device file port to communicate with the Palm handheld. If this is not specified, pilot-foto will look for the $PILOTPORT environment
variable. If neither are found or supplied, pilot-foto will print the usage information.
-q,
--quiet
Suppress 'Hit HotSync button' message
-v, --version
Display version of pilot-foto and exit without connecting.
Help Options
-h, --help
Display the help synopsis for pilot-foto and exit without connecting.
--usage
Display a brief usage message and exit without connecting.
EXAMPLES
Examples:
pilot-foto -p /dev/pilot -f pilot-foto -d MyImage.jpg
pilot-foto -i MyImage.jpg
pilot-foto -i *.jpg
pilot-foto -f MyImage
pilot-foto -c MyImage.jpg.pdb
PROBLEMS
Palm has not published their database format for the thumbnails. So, pilot-foto puts a generic penguin thumbnail for every image uploaded.
Fotos can be accessed by a named list on the handheld as well as the thumbnails. This has been tried on a couple of handhelds. It is possi-
ble that a foreign palm or different model will not like it.
To get a thumbnail image you can copy the jpegs to the memory card. If you copy them back to the handheld they will have a new thumbnail
that matches the jpeg.
AUTHOR
This manual page was converted to XML by Neil Williams <linux@codehelp.co.uk>
BUGS
If a jpeg is installed with the same name as one already on the palm you will have 2 thumbnails pointing to the same jpeg. The new jpeg
will overwrite the old jpeg.
If the thumbnail fails to install then the jpeg should be removed. It is not.
We have an online bug tracker. Using this is the only way to ensure that your bugs are recorded and that we can track them until they are
resolved or closed. Reporting bugs via email, while easy, is not very useful in terms of accountability. Please point your browser to
http://bugs.pilot-link.org: http://bugs.pilot-link.org and report your bugs and issues there.
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER-
CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
SEE ALSO
pilot-link(7)
0.12.5 Copyright 1996-2007 FSF pilot-foto(1)