CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - Software Support
  Error updating ecryptfs-utils-75-8.el5

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  culley
      culley
Error updating ecryptfs-utils-75-8.el5
#1
Peeking in the Member Window
Joined: 2011/8/12
From
Posts: 12
Hi,

So basically I ran YUM to check for updates and saw there was once for ecryptfs-utils, I chose to update, it downloaded fine but when it came to install I was prevented with an error. I have highlighted the exact error message the output from my terminal.

Quote:
[user@localhost ~]# yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.ellogroup.com
* epel: mirrors.coreix.net
* extras: mirror.ellogroup.com
* updates: mirror.ellogroup.com
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package ecryptfs-utils.i386 0:75-8.el5 set to be updated
--> Finished Dependency Resolution Dependencies Resolved

Updating: ecryptfs-utils i386 75-8.el5 base 159 k Transaction Summary

Install 0 Package(s)
Upgrade 1 Package(s)

Total download size: 159 k Is this ok [y/N]: y
Downloading Packages:
ecryptfs-utils-75-8.el5.i386.rpm 159 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
groupadd: unable to open group file Error in PREIN scriptlet in rpm package ecryptfs-utils-75-8.el5.i386
error: %pre(ecryptfs-utils-75-8.el5.i386) scriptlet failed, exit status 10
error: install: %pre scriptlet failed (2), skipping ecryptfs-utils-75-8.el5


Failed: ecryptfs-utils.i386 0:75-8.el5

Complete! [user@localhost ~]#


I have checked the permissions on /etc/group and they show up as,



Quote:
[user@localhost ~]# ls -ls /etc/group
8 -rw-rw-r-- 1 root root 2869 Jan 26 12:14 /etc/group
[user@localhost ~]#


I have permisson to write to file.

I also ran ls -Z

Quote:
[user@localhost ~]# ls -Z /etc/group
-rw-rw-r-- root root user_u:object_r:user_home_t /etc/group
[user@localhost ~]#


But still no luck. I have Googled but came up with nothing regarding this error for ecryptfs-utils, I saw some people were having errors with writing to /etc/group but I can so I believe that it not the issue, but I could be wrong. Any help would be appreciated.

Regards
Posted on: 2012/3/23 8:17
Create PDF from Post Print
Top
  •  TrevorH
      TrevorH
Re: Error updating ecryptfs-utils-75-8.el5
#2
Moderator
Joined: 2009/9/24
From Brighton, UK
Posts: 6335
The only thing that the preinstall script for that package does is run groupadd to add a group. It's complaining about being unable to write to the /etc/group file - check the permissions on that file and its ownership. If those look correct then check with lsattr to see if it's been made immutable (and if so, triple check to find out who did it and why because immutable files are sometimes evidence of being hacked). Also check with ls -laZ to see that it has the correct selinux context.

# ls -laZ /etc/group
-rw-r--r--  root root system_u:object_r:etc_t          /etc/group
_________________
Linux/VoIP Systems Administrator
Posted on: 2012/3/23 13:35
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: Error updating ecryptfs-utils-75-8.el5
#3
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
Quote:

culley wrote:
...
[user@localhost ~]# ls -Z /etc/group
-rw-rw-r-- root root user_u:object_r:user_home_t /etc/group
[user@localhost ~]#
...


Both the SELinux context and the permissions are wrong. They should be as shown in Trevor's post. One must wonder how they got that way and, if other files are also in a similar state. Might try the following for a start:
# ls -lZ passwd* shadow* group* gshadow*
-rw-r--r--  root root system_u:object_r:etc_t          group
-rw-r--r--  root root system_u:object_r:etc_t          group-
-r--------  root root system_u:object_r:shadow_t       gshadow
-r--------  root root system_u:object_r:shadow_t       gshadow-
-rw-r--r--  root root system_u:object_r:etc_t          passwd
-rw-r--r--  root root system_u:object_r:etc_t          passwd-
-r--------  root root system_u:object_r:shadow_t       shadow
-r--------  root root system_u:object_r:shadow_t       shadow-

Perhaps this thread should move to the Security forum if you can't explain it.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/3/23 15:18
Create PDF from Post Print
Top
  •  culley
      culley
Re: Error updating ecryptfs-utils-75-8.el5
#4
Peeking in the Member Window
Joined: 2011/8/12
From
Posts: 12
I have changed permissions and security context and now updating ecryptfs-utils works perfectly. It was strange how the permissions and security context had changed.

I ran

Quote:
ls -lZ


and no other file was affected. This box isn't connected to the internet, And no one else has access to it so I must conclude that I did something to cause these irregularities.

Thanks.
Posted on: 2012/3/24 8:02
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: Error updating ecryptfs-utils-75-8.el5
#5
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
It looks like the file had the SELinux context of a user's home directory. If the original was somehow deleted or moved, and replaced by a copy, that could explain it.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/3/24 15:06
Create PDF from Post Print
Top
  •  culley
      culley
Re: Error updating ecryptfs-utils-75-8.el5
#6
Peeking in the Member Window
Joined: 2011/8/12
From
Posts: 12
Quote:

pschaff wrote:
It looks like the file had the SELinux context of a user's home directory. If the original was somehow deleted or moved, and replaced by a copy, that could explain it.


Yeah that's sounds right I reinstalled the server and backed up the config to samba file server which is also running CentOS, I didn't realise.

Now I will though

Much regards
Posted on: 2012/3/24 18:37
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: Error updating ecryptfs-utils-75-8.el5
#7
Moderator
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
If backing up you could use a tar archive with the "--selinux" switch to preserve the context.
_________________
Phil

Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2012/3/24 23:01
Create PDF from Post Print
Top
  •  TrevorH
      TrevorH
Re: Error updating ecryptfs-utils-75-8.el5
#8
Moderator
Joined: 2009/9/24
From Brighton, UK
Posts: 6335
Also, if you cp files then the selinux context gets set automatically to the right thing based on its destination but if you mv them then it brings the context with the file that's being moved and that's how it gets the wrong value.
_________________
Linux/VoIP Systems Administrator
Posted on: 2012/3/25 2:26
Create PDF from Post Print
Top
  •  milosb
      milosb
Re: Error updating ecryptfs-utils-75-8.el5
#9
Professional Board Member
Joined: 2009/1/18
From 44°49′14″N 20°27′44″E
Posts: 661
Just a quick question: did you alter any of the output code posted for security reasons?
Cause it not, I believe this to be the culprit:
Quote:

[user@localhost ~]# yum update
<snip>

Strangely nobody noticed that the yum update is being run as a non-root user, or simply neglected to ask....

EDIT: Normally, it wouldn't occur to me either, since I get "You need to be root to perform this command." in an attempt to run it as non root user.
_________________
Milos
Posted on: 2012/4/28 18:05
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com