Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average. Display Modes
Old 04-15-2004, 09:39 PM   #1
caleb
Prospect
 
Join Date: Oct 2003
Posts: 8
software Update permission denied

When I try to use software update i get this message.

"Make sure you have permission to write to /private/tmp/502/TemporaryItems/com.apple.SoftwareUpdate, then try again."

Can anyone help me? I know there is a simple solution. I just don't know it.
caleb is offline   Reply With Quote
Old 04-15-2004, 10:04 PM   #2
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Please tell us more details about what your situation is and what you have been trying to do. E.g. are you logged in as an admin? Are you doing software update via the menu or on the command-line? Has it worked for you in the past? What has changed recently on your machine.

And show us the results of doing the following 5 commands in a Terminal window (copy & paste the commands and the results):

id
ls -ld /private/tmp
ls -ld /private/tmp/502
ls -ld /private/tmp/502/TemporaryItems
ls -ld /private/tmp/502/TemporaryItems/com.apple.SoftwareUpdate
hayne is offline   Reply With Quote
Old 04-15-2004, 10:29 PM   #3
caleb
Prospect
 
Join Date: Oct 2003
Posts: 8
I am not logged on as root. I am using softwareUpdate from the menu or Pref Pane. As for changes...nothing of note. I use my machine constantly though so there are any number of things that may have gone wrong.

Here are the responses produced by terminal to these querys.

[iMac:~] caleb% id
uid=502(caleb) gid=20(staff) groups=20(staff), 80(admin)
[iMac:~] caleb% ls -ld /private/tmp
drwxrwxrwt 3 root wheel 102 15 Apr 16:26 /private/tmp
[iMac:~] caleb% ls -ld /private/tmp/502
drwx------ 3 caleb wheel 102 15 Apr 16:26 /private/tmp/502
[iMac:~] caleb% ls -ld /private/tmp/502/TemporaryItems
drwxr-xr-x 2 caleb wheel 68 15 Apr 18:34 /private/tmp/502/TemporaryItems
[iMac:~] caleb% ls -ld /private/tmp/502/TemporaryItems/com.apple.SoftwareUpdate
ls: /private/tmp/502/TemporaryItems/com.apple.SoftwareUpdate: No such file or directory

I hope this makes some sense to someone.
caleb is offline   Reply With Quote
Old 04-15-2004, 11:00 PM   #4
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
missing symbolic link /tmp ?

I suspect (after some googling) that you have the problem described in this Apple document:
http://docs.info.apple.com/article.html?artnum=107396

As that document says, you can check if this is your problem by executing the following command in a Terminal window:

ls -la / | grep tmp
hayne is offline   Reply With Quote
Old 04-16-2004, 12:02 AM   #5
caleb
Prospect
 
Join Date: Oct 2003
Posts: 8
After reviewing the apple support doc I realized that I have all the problems listed. I was hopeful that this would fix them all. So I did it...

I thought that it worked, but alas...it didn't.

I typed in said command and got

[iMac:~] caleb% ls -la / | grep tmp
drwxr-xr-x 8 501 staff 272 15 Apr 13:35 tmp

I went to the apple support page and tried
[iMac:~] caleb% sudo ln -s /private/tmp /tmp
Password:
[iMac:~] caleb% ls -la / | grep tmp
drwxr-xr-x 9 501 staff 306 15 Apr 20:56 tmp

any ideas?
caleb is offline   Reply With Quote
Old 04-16-2004, 12:42 AM   #6
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Quote:
Originally Posted by caleb
[iMac:~] caleb% ls -la / | grep tmp
drwxr-xr-x 8 501 staff 272 15 Apr 13:35 tmp

That shows that you have a directory (i.e. a folder) named /tmp
This is not what you want - you want it to be a symbolic link to /private/tmp

Quote:
[iMac:~] caleb% sudo ln -s /private/tmp /tmp
Password:
[iMac:~] caleb% ls -la / | grep tmp
drwxr-xr-x 9 501 staff 306 15 Apr 20:56 tmp

This shows that the 'ln' command did not work. It should have complained that the directory /tmp already existed and the fact that it didn't complain seems to indicate a bug in the 'ln' command. But that is neither here nor there for your problem. You need to remove that existing directory (/tmp) before you create the symbolic link.
So you should execute the following command in a Terminal window:

sudo rmdir /tmp

If you get an error from that saying that the directory is not empty, then we need to look at what is in that directory before we delete it. So, if you get that error message then show us what you get from the command:

ls -la /tmp

If (as we hope) you don't get an error message from the 'rmdir' command, then you are ready to recreate the symbolic link by doing the command you read in the Apple document:

sudo ln -s /private/tmp /tmp

And then to verify that it worked, do this:

ls -la / | grep tmp

If that shows you the symbolic link (with the ->) then all is back to normal.
In which case, you should start to think about what might have caused this to happen. Could you possibly have removed this folder (/tmp) when booted in OS 9 ? Have you installed any OS X software recently that asked for your admin password?
hayne is offline   Reply With Quote
Old 04-16-2004, 01:34 AM   #7
caleb
Prospect
 
Join Date: Oct 2003
Posts: 8
sorry!

[iMac:~] caleb% sudo rmdir /tmp
rmdir: /tmp: Directory not empty
[iMac:~] caleb% ls -la /tmp
total 136
drwxr-xr-x 8 501 staff 272 15 Apr 21:38 .
drwxrwxr-t 54 root admin 1836 15 Apr 21:38 ..
-rwxr--r-- 1 root staff 4 15 Apr 21:34 .FDTDaemon.pid
srwx------ 1 root staff 0 15 Apr 21:33 .com.symantec.DTSock
-rw-r--r-- 1 root staff 646 15 Apr 21:34 mcx_compositor
-rw-r--r-- 1 root staff 55736 15 Apr 21:34 ppp.log
srwxrw-rw- 1 root staff 0 14 Apr 12:14 slp_ipc
lrwxr-xr-x 1 501 staff 12 15 Apr 20:56 tmp -> /private/tmp
caleb is offline   Reply With Quote
Old 04-16-2004, 02:11 AM   #8
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
One of those files is the symbolic link that we were trying to create earlier. But it's in the wrong place, so let's start by deleting it. Execute the following command in a Terminal window:

sudo rm /tmp/tmp

Now if you redo the 'ls -la /tmp' command, you should see that the last entry (the symbolic link) is gone.

Since there are several other files in that /tmp folder, and some of them might be in use at the moment, I would recommend restarting your Mac and then doing the following before connecting to Internet. (Some of the files seem to be related to Internet connections.)

1) Check again what files are in the /tmp directory by doing:

ls -la /tmp

2) Assuming there doesn't seem to be anything important there (i.e. at least nothing more than showed up earlier), let's go ahead and remove all the files that are in the /tmp directory by doing the following commands:

cd /tmp [edit](important! I had forgotten to write this the first time)[/edit]
sudo rm -i *
sudo rm -i .*

The "-i" option in the above will make it ask you to confirm deletion of each file as it comes to it (we're being extra careful here) - reply with y (as it tells you to).

3) Now the /tmp directory should be empty, so we can remove it with the following command:

sudo rmdir /tmp

4) Finally, we can recreate the symbolic link by doing the following command:

sudo ln -s /private/tmp /tmp

5) Check that the symbolic link is there by doing the following command:

ls -la / | grep tmp

6) If it shows up properly (something like:
lrwxr-xr-x 1 root admin 11 3 Dec 04:26 tmp -> private/tmp )
then you should restart your Mac and then all should be well.

NB: Since I'm recommending that you do the above without connecting to Internet, you will obviously need to copy those instructions down on paper (or print them).

Last edited by hayne; 04-16-2004 at 02:18 AM.
hayne is offline   Reply With Quote
Old 04-16-2004, 11:32 AM   #9
caleb
Prospect
 
Join Date: Oct 2003
Posts: 8
After following hayne's directions everything works great.
caleb is offline   Reply With Quote
Old 05-12-2004, 10:12 AM   #10
rap01
Prospect
 
Join Date: May 2004
Posts: 2
Folks,

I've got the same problem, I've gone through all the above but still get the problem.

Any other ideas?
rap01 is offline   Reply With Quote
Old 05-12-2004, 11:07 AM   #11
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,473
Quote:
Originally Posted by rap01
I've got the same problem, I've gone through all the above but still get the problem.

Any other ideas?

Please supply full details about your problem and what you have done to try to solve it. If you have gone through the instructions I outlined for caleb, at what point does it fail?
hayne is offline   Reply With Quote
Old 05-12-2004, 11:17 AM   #12
rap01
Prospect
 
Join Date: May 2004
Posts: 2
When I use software update, i get passed the request a password and the agreeing to T&C's but then I get the following error

"Make sure you have permission to write to /tmp/501/TemporaryItems/com.apple.SoftwareUpdate, then try again."

If I try and just download the updates I get the following error

"Make sure you have permission to write to /Library/Packages, then try again."

I can manually download the updates from the apple site and install them.


I followed through your instructions down to the point where i got ....

lrwxr-xr-x 1 root admin 11 3 Dec 04:26 tmp -> /private/tmp

restarted and tried again but still have no joy.

any ideas?
rap01 is offline   Reply With Quote
Old 06-06-2004, 09:08 AM   #13
basti_k
Triple-A Player
 
Join Date: Jun 2003
Posts: 64
i've got the same problem as 'rap01'

- repaired permissions
- tried my main user, tried root, created new user - fails on every try

manually d/ling and installing works fine...
basti_k is offline   Reply With Quote
Old 06-08-2004, 04:15 PM   #14
basti_k
Triple-A Player
 
Join Date: Jun 2003
Posts: 64
"tar" is missing!

i just tried to do a softwareupdate via CLI:

sudo softwareupdate -i -a

it returned, it can't untar any files. so i tried a simple "tar" and bash returned -bash: tar: command not found

the last thing i can remember doing with software installations/removal was removing the developer tools...

any tips? reinstall devtools? only install "tar"? and how?

thanx in advance...
basti_k is offline   Reply With Quote
Old 06-08-2004, 08:27 PM   #15
trevor
Moderator
 
Join Date: Jun 2003
Location: Boulder, CO USA
Posts: 19,854
basti_k:

tar should not be related to the Developer Tools. More likely you've hosed your path. Try this:
ls -al /usr/bin/tar

You should get a response like:
-rwxr-xr-x 1 root wheel 174636 15 Mar 18:03 /usr/bin/tar

If you DON'T get that response, then boot to your Installer CD, choose Custom Install, and install JUST the BSD Subsystem.

If you DO get that response, then type the following and copy/paste it here:

echo $PATH

This will show your current path. It is likely that somehow you've eliminated /usr/bin from your path, which needs to be fixed. Just for an example, here is my path:

/sw/bin:/sw/sbin:/usr/local/lib:/usr/X11R6/bin:/usr/X11R6/lib:
/usr/X11R6/include/X11:/Users/trevor/bin:/usr/local/bin:/usr/bin:/bin:/usr/
local/sbin:/usr/sbin:/sbin:/usr/lib:/usr/local/squid/bin:/Developer/Tools:.


Trevor
trevor is online now   Reply With Quote
Old 06-08-2004, 11:01 PM   #16
basti_k
Triple-A Player
 
Join Date: Jun 2003
Posts: 64
hi trevor, thanx for your response.

ls -al /usr/bin/tar returns: ls: /usr/bin/tar: No such file or directory

JFYI: echo $PATH reutrns: /bin:/sbin:/usr/bin:/usr/sbin

i just inserted my 10.3 dvd and i'll do a "BSD Subsystem" install.

*reboot*
basti_k is offline   Reply With Quote
Old 06-08-2004, 11:15 PM   #17
mervTormel
League Commissioner
 
Join Date: Jan 2002
Posts: 5,536
hmm, tar isn't in the BSD pkg, me thinks...

$ grepbom /usr/bin/tar
........./usr/bin/tar wheel root -rwxr-xr-x 174,636 Wed Sep 24 01:42:37 2003
====> /Library/Receipts/BaseSystem.pkg/Contents/Archive.bom


it should have been installed without BSD, but give it a go...
mervTormel is offline   Reply With Quote
Old 06-08-2004, 11:32 PM   #18
basti_k
Triple-A Player
 
Join Date: Jun 2003
Posts: 64
hi mervTormel,

you're right...

couldn't install from the booted dvd -> "there's a newer version of mac os x installed" (10.3.4 that is).

so i installed from /Volumes/PowerMac Software/System/Installation/Packages/BSD.pkg - but no "tar" there.

i'm d/ling a copy of pacifist (v1.6.3) to install BaseSystem.pkg...
basti_k is offline   Reply With Quote
Old 06-08-2004, 11:43 PM   #19
basti_k
Triple-A Player
 
Join Date: Jun 2003
Posts: 64
hi again,

i just installed everything that was missing in /bin.
running sw update: it's d/ling... and HURRAY! it's unpacking.

thanx for your help.

...i think a fresh install this weekend should be done...

greetz
basti
basti_k is offline   Reply With Quote
Old 10-07-2004, 01:04 AM   #20
mikehkg
Prospect
 
Join Date: Oct 2004
Posts: 1
Thumbs up tks Hayne

Hayne, tks a lot for your detailed post.
My terminal said that items starting with "." or ".." could not be deleted (there were also 2 directories inside the temp folder which i had no clue how to delete them), so i could only partly follow your solution. However, i finally figured out to quit terminal window, did a search for the "tmp" invisible folder (made sure its the one residing inside /private!!), then trashed it in the sherlocks window. Then i went back to your instructions, found that the Tmp directory was indeed properly trashed
(ls -ld /private/tmp), so i followed point 4) - 6), and voilą, it worked.

This may not be smart if there are multiple users for the same machine (since trashing the tmp folder would also trash other user's tmp folders inside it?) but seems to me that your above post was already based on the single-user machine.

In my opinion, OS X installation should offer the whole permissions and multi-users functions stuff as an optional install as this functions may probably not be used elsewhere than in schools etc.
(except of course for the exitement of showing off fast user switching...)
mikehkg is offline   Reply With Quote
Reply


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

Forum Jump



All times are GMT -5. The time now is 06:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.