Bug 725886

Summary: screen binary may have wrong permissions
Product: [Fedora] Fedora Reporter: Need Real Name <lsof>
Component: screenAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: lsof, mlichvar
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-29 13:32:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2011-07-26 20:50:57 UTC
Description of problem:
# rpm --setperms screen
# screen -r
Directory '/var/run/screen' must have mode 777.

Version-Release number of selected component (if applicable):
screen-4.1.0-0.3.20101110git066b098.fc15.x86_64

How reproducible:
Every time.

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Fedora Admin XMLRPC Client 2011-08-08 08:17:03 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Lukáš Nykrýn 2011-08-11 06:51:55 UTC
Can you please send me some example or log, where this is an issue?

Comment 3 Need Real Name 2011-08-11 15:48:17 UTC
Do this:
chmod 0 /var/run/screen
rpm --setperms screen
screen -r

Then you will see the error.

Comment 4 Lukáš Nykrýn 2011-08-12 06:53:39 UTC
/var/run/screen has permission drwxrwxr-x
/usr/bin/screen has permission -rwxr-sr-x
Because screen has setgid flag, it can write into /var/run/screen under all users.

Check please that your binary has set correct permissions.

Comment 5 Need Real Name 2011-08-12 15:59:40 UTC
# ls -la /usr/bin/screen
-rwxr-xr-x. 1 root screen 437376 Feb 10  2011 /usr/bin/screen

# rpm --setperms /usr/bin/screen

# ls -la /usr/bin/screen
-rwxr-xr-x. 1 root screen 437376 Feb 10  2011 /usr/bin/screen

Are the permissions in the package wrong?

Comment 6 Lukáš Nykrýn 2011-08-13 07:18:58 UTC
Permissions in package seem to be correct 
# rpm -qlv screen | grep '/usr/bin/screen'
-rwxr-sr-x    1 root    screen                 432608 úno 10  2011 /usr/bin/screen

In your previous example --setperms /usr/bin/screen does not work, use --setperms screen
 
# ls -l /usr/bin/screen 
-rwxr-sr-x. 1 root screen 437376 10. úno  2011 /usr/bin/screen

# chmod 000 /usr/bin/screen
# ls -l /usr/bin/screen 
----------. 1 root screen 437376 10. úno  2011 /usr/bin/screen

# rpm --setperms /usr/bin/screen
# ls -l /usr/bin/screen
----------. 1 root screen 437376 10. úno  2011 /usr/bin/screen

# rpm --setperms screen
# ls -l /usr/bin/screen
-rwxr-sr-x. 1 root screen 437376 10. úno  2011 /usr/bin/screen

Comment 7 Need Real Name 2011-08-15 19:19:40 UTC
Thanks. I wonder how that got changed.

Would it be possible that the error message be updated to mention that the screen binary may have the wrong permissions (since the error about directory permissions will always be bogus).

Comment 8 Lukáš Nykrýn 2011-08-16 06:34:55 UTC
Can you please post result of
rpm -q screen
rpm -qlv screen | grep '/usr/bin/screen'
to be sure, that there is no problem in package

Comment 9 Need Real Name 2011-08-16 16:51:06 UTC
screen-4.1.0-0.3.20101110git066b098.fc15.x86_64

-rwxr-sr-x    1 root    screen                 432608 Feb 10  2011 /usr/bin/screen

Comment 10 Lukáš Nykrýn 2011-08-17 13:26:55 UTC
I looked at generating the error message and I don't think that it is wrong, because it is created according to permission of binary.

Comment 11 Need Real Name 2011-08-18 16:40:48 UTC
So my problem was that the permissions of the binary were wrong, but I got an error about the permissions for the /var/run/screen directory being wrong.

So the logic can't be right?

Comment 12 Lukáš Nykrýn 2011-08-18 19:43:29 UTC
The error message is based on actual permission of the binary, so if yours are different it tells you how to set permissions of directory with sockets.