Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 300589 - Openssh does cannot move sshd to right location after compilation
Summary: Openssh does cannot move sshd to right location after compilation
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-11 13:56 UTC by Christian Ejlertsen
Modified: 2010-01-13 09:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
full build log. (build.log,146.45 KB, text/plain)
2010-01-11 13:57 UTC, Christian Ejlertsen
Details
openssh build log (build.log,146.54 KB, text/plain)
2010-01-13 08:02 UTC, Christian Ejlertsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ejlertsen 2010-01-11 13:56:09 UTC
The openssh installation encounters this error after is has compiled and is trying to install the last part. Last part of console build log is in the last part of the mail
I've had this problem for at bit, but initially thought it would be solved in newer version perhaps due to ebuild problem of some sort.

I have the full build log if needed.

Thank you in advance
Christian

*  net-misc/openssh
      Latest version available: 5.2_p1-r3
      Latest version installed: 5.1_p1-r1
 
Last part of build log
--------

>>> Installing (1 of 1) net-misc/openssh-5.2_p1-r3
 * >>> SetUID: [chmod go-r] /usr/lib/misc/ssh-keysign ...                                                                                                             [ ok ]
!!! Failed to move /var/tmp/portage/net-misc/openssh-5.2_p1-r3/image/usr/sbin/sshd to /usr/sbin/sshd
!!! [Errno 1] Operation not permitted

>>> Failed to install net-misc/openssh-5.2_p1-r3, Log file:

>>>  '/var/tmp/portage/net-misc/openssh-5.2_p1-r3/temp/build.log'

Reproducible: Always

Steps to Reproduce:
1. emerge -u openssh
2.
3.
Comment 1 Christian Ejlertsen 2010-01-11 13:57:13 UTC
Created attachment 216069 [details]
full build log.

Here is the full build log.
Comment 2 Patrick Lauer gentoo-dev 2010-01-11 14:45:07 UTC
!!! [Errno 1] Operation not permitted

having the location ( /usr/sbin if I'm not mistaken ) writeable helps if you want to write files. It's a user/configuration error, please fix it.
Comment 3 Christian Ejlertsen 2010-01-11 15:01:31 UTC
(In reply to comment #2)
> !!! [Errno 1] Operation not permitted
> 
> having the location ( /usr/sbin if I'm not mistaken ) writeable helps if you
> want to write files. It's a user/configuration error, please fix it.
> 

Well not this time. Below is the state of the sshd file and the usr /usr/sbin directory, both are writable.

-rwxr-xr-x 1 root root 1226683 Nov  4  2008 sshd

drwxr-xr-x   2 root root 12288 Nov  5 09:58 sbin

Comment 4 Patrick Lauer gentoo-dev 2010-01-12 21:37:50 UTC
Right, so why does it say "operation not permitted" ?

Have a look at "mount" output, is /usr mounted readonly?
If not, anything in dmesg output that gives a hint?
Comment 5 Christian Ejlertsen 2010-01-12 22:57:08 UTC
(In reply to comment #4)
> Right, so why does it say "operation not permitted" ?
> 
> Have a look at "mount" output, is /usr mounted readonly?
> If not, anything in dmesg output that gives a hint?
> 

Well mount output looks good as far as i can see,in dmesg what would i be looking for ??.

-- out of fstab and mount

entwined ~ # cat /etc/fstab
/dev/sda1        /boot   ext2    defaults                1 2
/dev/sda2        none            swap            sw              0 0
/dev/sda3        /       ext3    noatime                 0 1
none        /proc     proc    defaults          0 0
none        /dev/shm  tmpfs   defaults          0 0
entwined ~ # mount
/dev/sda3 on / type ext3 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/sda1 on /boot type ext2 (rw)
none on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
securityfs on /sys/kernel/security type securityfs (rw,noexec,nosuid,nodev)



Comment 6 Dan Wallis 2010-01-13 04:11:39 UTC
So /usr is part of /. What are the permissions on those two directories? ie, what's the output of: ls -ld / /usr /usr/sbin /usr/sbin/sshd

Also, are you (well, root) able to modify other files in /usr/sbin, or do they get error 1 too?

Do you get any more useful output when running emerge in verbose mode?
Comment 7 Christian Ejlertsen 2010-01-13 07:56:41 UTC
(In reply to comment #6)
> So /usr is part of /. What are the permissions on those two directories? ie,
> what's the output of: ls -ld / /usr /usr/sbin /usr/sbin/sshd
> 
> Also, are you (well, root) able to modify other files in /usr/sbin, or do they
> get error 1 too?
> 
> Do you get any more useful output when running emerge in verbose mode?
> 

I'm able to create move delete files in the /usr/sbin/ directory.
Below is the output from the ls -ld commands on / /usr /usr/sbin and /usr/sbin/sshd and the last output from emerge -uv openssh i'll attach the new buildlog to the case.

Regards
Christian
-----------

entwined ~ # ls -ld /
drwxr-xr-x 20 root root 4096 Jan 11 12:00 /
entwined sbin # ls -ld /usr/
drwxr-xr-x 12 root root 4096 Nov  5 09:35 /usr/
entwined sbin # ls -ld /usr/sbin/
drwxr-xr-x 2 root root 12288 Jan 13 07:13 /usr/sbin/
entwined sbin # ls -ld /usr/sbin/sshd
-rwxr-xr-x 1 root root 1226683 Nov  4  2008 /usr/sbin/sshd


>>> Installing (1 of 1) net-misc/openssh-5.2_p1-r3
 * checking 47 files for package collisions
 * >>> SetUID: [chmod go-r] /usr/lib/misc/ssh-keysign ...                                                                                        [ ok ]
--- /usr/
--- /usr/sbin/
!!! Failed to move /var/tmp/portage/net-misc/openssh-5.2_p1-r3/image/usr/sbin/sshd to /usr/sbin/sshd
!!! [Errno 1] Operation not permitted
Comment 8 Christian Ejlertsen 2010-01-13 08:02:00 UTC
Created attachment 216336 [details]
openssh build log
Comment 9 Dan Wallis 2010-01-13 08:41:43 UTC
Thanks for the extra info. Unfortunately I can't see anything amiss there; perhaps others will notice something.

Another thought: has it been made immutable? ie, what's the output of:
 lsattr -d / /usr /usr/sbin /usr/sbin/sshd
(all in one command is easier to read)

If that doesn't show anything, then I'm out of ideas for the moment. Sorry.
Comment 10 Christian Ejlertsen 2010-01-13 09:17:20 UTC
(In reply to comment #9)
> Thanks for the extra info. Unfortunately I can't see anything amiss there;
> perhaps others will notice something.
> 
> Another thought: has it been made immutable? ie, what's the output of:
>  lsattr -d / /usr /usr/sbin /usr/sbin/sshd
> (all in one command is easier to read)
> 
> If that doesn't show anything, then I'm out of ideas for the moment. Sorry.
> 

Here's the output

entwined ~ #  lsattr -d / /usr /usr/sbin /usr/sbin/sshd
--------------- /
--------------- /usr
----------I---- /usr/sbin
s---ia--------- /usr/sbin/sshd
Comment 11 Christian Ejlertsen 2010-01-13 09:31:01 UTC
> 
> Here's the output
> 
> entwined ~ #  lsattr -d / /usr /usr/sbin /usr/sbin/sshd
> --------------- /
> --------------- /usr
> ----------I---- /usr/sbin
> s---ia--------- /usr/sbin/sshd
> 

Ok then, thank you for the help
I removed the attributes on the file and after that /usr/bin/ssh now openssh installed.

How the file became immutable i have no idea about but now openssh installed and i'm a happy camper.

Thank you to all that helped