Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-05-2005, 03:10 AM
|
#1
|
LQ Newbie
Registered: Feb 2005
Posts: 4
Rep:
|
permission denied writing to /tmp
I have encountered a problem of creating files and removing files from /tmp directory as a root.
For example an attempt to copy a file from a different directory gets an error message as follows:
[root@panther tmp]# cp /etc/resolv.conf
cp: cannot create regular file './resolv.conf': Permission denied
Similar error message occurs in attempting to create a file with vi .
I have checked the available space and there seems to be plenty
[root@panther tmp]# df /tmp
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda1 495828 344398 125831 74% /
|
|
|
02-05-2005, 03:40 AM
|
#2
|
Senior Member
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555
Rep:
|
Re: permission denied writing to /tmp
Quote:
Originally posted by rsteelman
[root@panther tmp]# cp /etc/resolv.conf
|
If this is what you typed, you tried to cp resolv.conf onto itself. It doesn't allow me to execute that command because of a missing destination. try
cp /etc/resolv.conf ./
from within /tmp. You didn't specify the ./ destination
|
|
|
02-05-2005, 10:51 AM
|
#3
|
LQ Newbie
Registered: Feb 2005
Posts: 4
Original Poster
Rep:
|
My apologies .. ommitted the dot at the end .. meaning the command I typed looks like this
[root@panther tmp]# cp /etc/resolv.conf .
I only use this to demonstrate a point that /tmp directory can't be written and some apps are failing because of this. It should be quite clear that I really don't need to copy resolv.conf to /tmp directory.
|
|
|
02-05-2005, 01:12 PM
|
#4
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
What does "ls -ld /tmp" (no quotes) have to day? I suspect it's permissions problems, in which case, "chown root:root /tmp ; chmod 1777 /tmp" (again no quotes) should set things right again.
|
|
|
02-05-2005, 11:03 PM
|
#5
|
LQ Newbie
Registered: Feb 2005
Posts: 4
Original Poster
Rep:
|
Only if it were that simple .. ls -ld /tmp displays following
drwxrwxrwt 8 root root 1024 Jan 31 04:12 /tmp/
I think this is exactly what it should be ..
|
|
|
02-06-2005, 12:18 AM
|
#6
|
Senior Member
Registered: Jan 2003
Posts: 2,786
|
What does df -i /tmp say?
You may be out of inodes rather than raw disk space.
|
|
|
02-06-2005, 10:53 AM
|
#7
|
LQ Newbie
Registered: Feb 2005
Posts: 4
Original Poster
Rep:
|
Interesting point .. but this doesn't seem to be case
df -i /tmp yields following
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 128016 44443 83573 35% /
|
|
|
02-06-2005, 07:10 PM
|
#8
|
Senior Member
Registered: Jan 2003
Posts: 2,786
|
Well, I honestly don't know what could be the problem. Have you run fsck on the partiion recently? I'd suggest using a live CD if you can. Other than that, I'm fresh out of ideas.
|
|
|
All times are GMT -5. The time now is 07:23 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|