Gentoo Forums
Gentoo Forums
Quick Search: in
permission denied on /var/tmp [SOLVED]
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
slack---line
l33t
l33t


Joined: 01 Apr 2005
Posts: 893
Location: /uk/sheffield

PostPosted: Tue Apr 22, 2008 4:25 am    Post subject: permission denied on /var/tmp [SOLVED] Reply with quote

Hi,

I've just moved /var/ to its own partition by simply copying everything over from the root /var that I had for some time.

I've now got a permission denied on /var/tmp/ and was wondering if anyone could tell me the correct permissions that I need to set....

Code:

# emerge -uDN world

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild     U ] sys-apps/portage-2.1.5_rc6 [2.1.5_rc5] USE="-build -doc -epydoc (-selinux)" LINGUAS="-pl" 0 kB
*** Portage will stop merging at this point and reload itself,
    then resume the merge.
[ebuild     U ] sys-apps/ed-0.9 [0.8] 67 kB
[ebuild     U ] x11-terms/xterm-235 [234] USE="-Xaw3d -paste64 -toolbar truetype unicode" 838 kB
[ebuild     U ] sys-apps/man-1.6f-r2 [1.6f-r1] USE="nls" 0 kB
[ebuild     U ] dev-libs/libtasn1-1.4 [1.3] USE="-doc" 1,516 kB
[ebuild   R   ] gnome-extra/evolution-data-server-2.22.1  USE="-debug -doc -gnome-keyring% ipv6 -kerberos (-keyring%) -krb4 -ldap ssl" 0 kB
[ebuild   R   ] gnome-base/gvfs-0.2.3  USE="-avahi -bluetooth cdda -debug -doc -fuse gnome -gnome-keyring% -gphoto2 -hal (-keyring%) -samba" 0 kB
[ebuild     U ] gnome-extra/yelp-2.22.1-r1 [2.22.1] USE="-beagle -debug -lzma -xulrunner" 0 kB
[ebuild   R   ] gnome-base/gdm-2.20.5  USE="-accessibility -afs -branding -debug -dmx -gnome-keyring% ipv6 (-keyring%) pam -remote (-selinux) tcpd -xinerama" 0 kB
[ebuild   R   ] media-sound/rhythmbox-0.11.5  USE="-daap dbus -debug -doc -gnome-keyring% -hal -ipod (-keyring%) -libnotify -lirc -mtp -musicbrainz python -tagwriting" 4,381 kB
[ebuild   R   ] app-office/openoffice-2.4.0  USE="-binfilter branding%* cups dbus -debug -eds firefox gnome -gstreamer gtk java -kde -ldap -mono -odk pam -seamonkey -webdav -xulrunner" LINGUAS="-af -ar -as_IN -be_BY -bg -bn -br -bs -ca -cs -cy -da -de -dz -el -en en_GB -en_US -en_ZA -eo -es -et -fa -fi -fr -ga -gl -gu_IN -he -hi_IN -hr -hu -it -ja -km -ko -ku -lt -lv -mk -ml_IN -mr_IN -nb -ne -nl -nn -nr -ns -or_IN -pa_IN -pl -pt -pt_BR -ru -rw -sh -sk -sl -sr -ss -st -sv -sw_TZ -ta_IN -te_IN -tg -th -ti_ER -tn -tr -ts -uk -ur_IN -ve -vi -xh -zh_CN -zh_TW -zu" 0 kB

Total: 11 packages (6 upgrades, 5 reinstalls), Size of downloads: 6,801 kB

>>> Verifying ebuild Manifests...
>>> starting parallel fetching pid 7631

>>> Emerging (1 of 11) sys-apps/portage-2.1.5_rc6 to /
 * portage-2.1.4.tar.bz2 RMD160 SHA1 SHA256 size ;-) ...                                     [ ok ]
 * portage-2.1.5_rc6.patch.bz2 RMD160 SHA1 SHA256 size ;-) ...                               [ ok ]
 * checking ebuild checksums ;-) ...                                                         [ ok ]
 * checking auxfile checksums ;-) ...                                                        [ ok ]
 * checking miscfile checksums ;-) ...                                                       [ ok ]
 * checking portage-2.1.4.tar.bz2 ;-) ...                                                    [ ok ]
 * checking portage-2.1.5_rc6.patch.bz2 ;-) ...                                              [ ok ]
>>> Unpacking source...
>>> Unpacking portage-2.1.4.tar.bz2 to /var/tmp/portage/sys-apps/portage-2.1.5_rc6/work
>>> Unpacking portage-2.1.5_rc6.patch.bz2 to /var/tmp/portage/sys-apps/portage-2.1.5_rc6/work
 * Applying portage-2.1.5_rc6.patch ...                                                      [ ok ]
 * Setting portage.VERSION to 2.1.5_rc6 ...                                                  [ ok ]
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/sys-apps/portage-2.1.5_rc6/work/portage-2.1.4 ...
>>> Source compiled.
>>> Test phase [not enabled]: sys-apps/portage-2.1.5_rc6

>>> Install portage-2.1.5_rc6 into /var/tmp/portage/sys-apps/portage-2.1.5_rc6/image/ category sys-apps
patching file make.conf
>>> Completed installing portage-2.1.5_rc6 into /var/tmp/portage/sys-apps/portage-2.1.5_rc6/image/

ecompressdir: bzip2 -9 /usr/share/man
strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/lib/portage/bin/tbz2tool
* checking 160 files for package collisions
>>> Merging sys-apps/portage-2.1.5_rc6 to /
[portage-2.1.5_rc6] bash: /var/tmp/._portage_reinstall_.JMy9Vz/bin/ebuild.sh: /bin/bash: bad interpreter: Permission denied
!!! FAILED preinst: 126


The current permissions ar...

Code:

# ls -l /var/ | grep tmp
drwxrwxrwt  8 root   root 4096 Apr 22 10:14 tmp


and within /var/tmp are...

Code:

# ls -la /var/tmp/
total 32
drwxrwxrwt  8 root    root    4096 Apr 22 10:14 .
drwxr-xr-x 14 root    root    4096 Apr 22 09:58 ..
drwxr-xr-x  4 root    root    4096 Jan  7 13:28 .distcc
drwxrwxr-x  2 portage portage 4096 Apr 21 18:30 binpkgs
drwxrwsr-x  2 root    portage 4096 Apr 23  2007 ccache
drwxr-xr-x  3 root    root    4096 Mar 16 17:11 cross
drwxrwxr-x  5 portage portage 4096 Apr 22 10:14 portage
drwxrwxrwt  2 root    root    4096 Dec  3 11:28 texfonts


I checked the permissions on this system against those of another system where /var/ sits on the main root partition, but can't see anything different as they look identical.

Thanks in advance for any tips/pointers,

slack
_________________
"Ubuntu" - an African word meaning "Gentoo is too hard for me".


Last edited by slack---line on Tue Apr 22, 2008 9:41 am; edited 1 time in total
Back to top
View user's profile Send private message
frostschutz
Veteran
Veteran


Joined: 22 Feb 2005
Posts: 1913
Location: Germany

PostPosted: Tue Apr 22, 2008 4:46 am    Post subject: Reply with quote

mounted read only / noexec perchance?
Back to top
View user's profile Send private message
slack---line
l33t
l33t


Joined: 01 Apr 2005
Posts: 893
Location: /uk/sheffield

PostPosted: Tue Apr 22, 2008 4:53 am    Post subject: Re: permission denied on /var/tmp after moving to new partit Reply with quote

slack---line wrote:

The current permissions are...

Code:

# ls -l /var/ | grep tmp
drwxrwxrwt  8 root   root 4096 Apr 22 10:14 tmp



...and the entry in /etc/fstab is...

/etc/fstab:

/dev/hdb6               /var/                   ext3            noatime,users   0 0


...so I 'd have thought that everything was fine, since this /etc/fstab entry is identical to the entry for /usr/portage which sits on its own partition (well it used to, I now mount it from NFS, and am trying to use the freed space to place /var/ on).
_________________
"Ubuntu" - an African word meaning "Gentoo is too hard for me".
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 7742
Location: beyond the rim

PostPosted: Tue Apr 22, 2008 7:34 am    Post subject: Reply with quote

Why do people always add 'users' to the mount options for system partitions (which is generally pretty useless and just causes problems as it implies a bunch of other options as well)?
Back to top
View user's profile Send private message
slack---line
l33t
l33t


Joined: 01 Apr 2005
Posts: 893
Location: /uk/sheffield

PostPosted: Tue Apr 22, 2008 7:43 am    Post subject: Reply with quote

In this instance it was laziness, the entry used to be for /usr/portage which I wanted to browse and list as a normal user, so I added 'users' to the mount option. This was about seven or eight years ago when I was starting out with GNU/Linux and before I discovered that I could simply add my user account to the portage group and set owner and group permissions to portage for that sub-directory.

Any thoughts on the permission's problem when moving /var/ to a separate partition?

slack
_________________
"Ubuntu" - an African word meaning "Gentoo is too hard for me".
Back to top
View user's profile Send private message
AllenJB
Veteran
Veteran


Joined: 02 Sep 2005
Posts: 1151
Location: Canterbury, Kent

PostPosted: Tue Apr 22, 2008 9:32 am    Post subject: Reply with quote

From "man mount":
Code:

              users  Allow  every  user  to  mount and unmount the file system.  This option implies the options noexec, nosuid, and nodev (unless overridden by
                     subsequent options, as in the option line users,exec,dev,suid).


Don't put "users" on system partitions - It implies "noexec", which means you can't execute things!
_________________
http://gentoo-wiki.com :: http://lug.org.uk :: http://www.linux.org/groups/ :: User Blogs
Back to top
View user's profile Send private message
slack---line
l33t
l33t


Joined: 01 Apr 2005
Posts: 893
Location: /uk/sheffield

PostPosted: Tue Apr 22, 2008 9:40 am    Post subject: Reply with quote

AllenJB wrote:
From "man mount":
Code:

              users  Allow  every  user  to  mount and unmount the file system.  This option implies the options noexec, nosuid, and nodev (unless overridden by
                     subsequent options, as in the option line users,exec,dev,suid).


Don't put "users" on system partitions - It implies "noexec", which means you can't execute things!


Thanks AllenJB for removing the obfuscation behind Genone's post.

My lesson for today has been well and truly learnt, and I won't be forgetting it in the future.

slack :P
_________________
"Ubuntu" - an African word meaning "Gentoo is too hard for me".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum