Problems after deleting /var/tmp


 
Thread Tools Search this Thread
Operating Systems HP-UX Problems after deleting /var/tmp
# 1  
Old 03-07-2017
Problems after deleting /var/tmp

Hi,

To clear up the filesystem, I archived /var/tmp (forgot that this directory was important for crontab), and then deleted the directory itself.
After that there were problems like crontab not accessible, certain ftp commands like mget not functioning, and worst there were some scripts which were not executable anymore.

I restored the /var/tmp, and the first two problems (crontab missing and mget not functioning) were resolved. However, the scripts remained not executable.

Is it possible that when I deleted /var/tmp, some symlinks were removed?
And therefore any of the problem scripts had some symlink from /var/tmp?

I cannot think of any other reason why there could be scripts which became not executable even after I had restored the directory.
# 2  
Old 03-07-2017
Hi,

What permissions did you set on /var/tmp when you restored it ? Speaking from my own experience on Linux and Solaris systems (and from some quick Googlings, this should apparently also be the case in recent releases of HP-UX) this is a directory that needs to have the sticky bit set, as well as being globally writeable.

In other words, it should have permissions that look like this:

Code:
$ ls -ld /var/tmp
drwxrwxrwt 25 root root 4096 Mar  3 17:22 /var/tmp

If it doesn't have permissions of 1777, then this could be the cause of your problems. Can you confirm what permissions you set on it when you re-created it ?
# 3  
Old 03-07-2017
/var/tmp is one of the most important directories in HP-UX as used by the system... You are lucky you havent rebooted your box because there you would have known how important...
Thats years now I havent had a box around but I can tell you all the system writings go there and as drysdalk mentionned its permissions are important I cant think of scripts but links yes there are some.. so I would get a backup and have a look or restore from backup then do some cleaning up... mostly reducing the size of logs
# 4  
Old 03-07-2017
Hi,

I did not make any changes after restoring /var/tmp, and I have checked that these are the permissions :

Code:
# ls -ld /var/tmp/
drwxrwxrwt  28 root       root         24576 Mar  7 16:02 /var/tmp/
#

Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 03-07-2017 at 04:26 AM.. Reason: Added CODE tags.
# 5  
Old 03-07-2017
drysdalks idea was a good one, but i think now is he time to resort to good old debugging techniques:

Quote:
Originally Posted by anaigini45
However, the scripts remained not executable.
What exactly do you mean by that? Obviously the execute-privilege of these were not changed, no? So, how did the fail? Error messages? Log entries? Exit codes? Smoking guns?

Quote:
Originally Posted by anaigini45
Is it possible that when I deleted /var/tmp, some symlinks were removed?
And therefore any of the problem scripts had some symlink from /var/tmp?
Yes, this might be possible, but yet again the opposite is equally possible. Instead of making wild guesses, you might want to analyse the problem - see above: try something, gather evidence, analyse it, then start over.

Quote:
Originally Posted by anaigini45
I cannot think of any other reason why there could be scripts which became not executable even after I had restored the directory.
This is the good thing about good debugging practice: you don't have to be overly creative in this regard. If a script you try to start fails with Error: failed to make the flurbishes grommicking it is quite obvious what happened.

If the script(s) you start fail to give any conclusive error message (in this case: shame on the programmers!) then look inside the scripts and search for the string "/var/tmp" to try to locate the places where it tries to access the directory in question.

I hope this helps.

bakunin
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Csh , how to set var value into new var, in short string concatenation

i try to find way to make string concatenation in csh ( sorry this is what i have ) so i found out i can't do : set string_buff = "" foreach line("`cat $source_dir/$f`") $string_buff = string_buff $line end how can i do string concatenation? (1 Reply)
Discussion started by: umen
1 Replies

2. UNIX for Dummies Questions & Answers

Problems with deleting punctuation and apostrophes

Dear All, I have a file which I want to get the list of frequency of each word, ignoring list of stop words and now I have problems which punctuations and " 's ". what I am doing is: sed 's///g' file01.txt > file01-clear.txt cat file01-clear.txt | tr "" ""| tr ' ' '\012' |sort |uniq -c... (3 Replies)
Discussion started by: A-V
3 Replies

3. Red Hat

[Errno 22] invalid mode ('w') or filename: '//var/lib/yum/rpmdb-indexes/conflicts.tmp'

Can anyone help me with this error? sudo yum install perl-Gtk2-WebKit Loaded plugins: langpacks, presto, refresh-packagekit, versionlock Setting up Install Process Resolving Dependencies --> Running transaction check ---> Package perl-Gtk2-WebKit.i686 0:0.09-1.fc15 will be installed -->... (0 Replies)
Discussion started by: cokedude
0 Replies

4. Solaris

urgent: single-user-mode, /var/tmp read-only

this is the situation: Power outage. Root mirror (svm). it goes to single-user-mode, asking for fsck. Fsck suceeds for one disk, but fail for the other. I can't use vi-editor, it says /var/tmp/Xz12a is a read-only file system. I need to break the mirror, there's no copy of... (2 Replies)
Discussion started by: Sun Fire
2 Replies

5. Linux

/var/tmp/slapd.log.swp delete?

Hi All, Can I delete the above file? It's big, about 1G. It's on a redhat ent 4 with ldap on it. Is that safe to delete? It wasn't been used for already a month and it's in the backup storage. Thanks for any comment you may add. (1 Reply)
Discussion started by: itik
1 Replies

6. Solaris

permission of /var/tmp

what's the impact if I change /var/tmp's permission into 750? (7 Replies)
Discussion started by: a2156z
7 Replies

7. Solaris

Usage of /var/tmp/ directory on Solaris 10

Hi All, I have some threaded applications. Design of the application is such that one thread will decode some data and put it in data structure, And main thread will wait for another child threads pick up the decoded data. The data will be large decoded files. Once decoded data is picked by... (1 Reply)
Discussion started by: patilmuragesh
1 Replies

8. UNIX for Dummies Questions & Answers

default permission of /var/tmp in AIX

I'm getting an error when trying to vi my .profile. This is the first time I've logged onto this machine and apparently its rarely logged into. I'm assuming from the error that it's a permissions problem in the /var/tmp directory. Can anyone assist? $ uname -a AIX machine 1 5 000D96BF4C00 $... (3 Replies)
Discussion started by: dangral
3 Replies

9. UNIX for Dummies Questions & Answers

monitoring /tmp and /var/tmp for suspicous activity

Hello, does anyone have a script that can check the contents of the /tmp directory and for example e-mail the directory content if anything other than session files are present? Maybe there are better ways to monitor suspicous /tmp and /var/tmp activity, if so I'm listening :) (1 Reply)
Discussion started by: jamesbond
1 Replies

10. UNIX for Advanced & Expert Users

Process responsible for filling up /var/tmp

Hi, Help ! - I have a process which I cannot find that is writing to /var/tmp every 10 minutes and filling up my partition, it is also filling up my wtmpx file. I have some software error correction for a faulty DIMM at the moment - is this likely to be causing this as well as over-loading my... (3 Replies)
Discussion started by: Mal
3 Replies
Login or Register to Ask a Question