Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

[SOLVED] mount: only root can do that (effective UID is 1677

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
khippy
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 79
Joined: Thu Aug 29, 2002 8:32 pm
Location: Braunschweig - Germany
Contact:
Contact khippy
Website

[SOLVED] mount: only root can do that (effective UID is 1677

  • Quote

Post by khippy » Sun Apr 10, 2011 3:45 pm

Code: Select all

host ~ # fdisk -l /dev/sda

Disk /dev/sda: 4076 MB, 4076642304 bytes
255 heads, 63 sectors/track, 495 cylinders, total 7962192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x001c2022

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63     7961183     3980560+   b  W95 FAT32
host ~ # mount /dev/sda1 /mnt/work/
mount: only root can do that (effective UID is 16777214)
host ~ # whoami; id
root
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
host ~ # strace -o out mount /dev/sda1 /mnt/work/
mount: only root can do that (effective UID is 16777214)
host ~ # tail out
mmap(NULL, 3704640, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fd7acec8000
close(3)                                = 0
umask(022)                              = 022
open("/dev/null", O_RDWR)               = 3
close(3)                                = 0
getuid()                                = 0
geteuid()                               = 16777214
write(2, "mount: only root can do that (ef"..., 56) = 56
write(2, "\n", 1)                       = 1
exit_group(1)                           = ?
This is only an example of a mount trial as root. Each and everything I want to mount gives the same error and same result.
Is there help available?
Last edited by khippy on Mon Apr 11, 2011 1:02 am, edited 1 time in total.
--
there are no silly questions
Top
khippy
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 79
Joined: Thu Aug 29, 2002 8:32 pm
Location: Braunschweig - Germany
Contact:
Contact khippy
Website

  • Quote

Post by khippy » Sun Apr 10, 2011 6:13 pm

Code: Select all

/*
 geteuid.c source file
 Print the real and effective user ID of a process.
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
int main( void )
{
        printf( "My real      user ID is %d\n", getuid() );
        printf( "My effective user ID is %d\n", geteuid() );
        return EXIT_SUCCESS;
}
This little C snippet compiles with

Code: Select all

gcc -o geteuid geteuid.c
I call it and it gives :

Code: Select all

host ~ # ./geteuid 
My real      user ID is 0
My effective user ID is 0
So, I assume mount or a helper to mount is broken, here.
--
there are no silly questions
Top
khippy
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 79
Joined: Thu Aug 29, 2002 8:32 pm
Location: Braunschweig - Germany
Contact:
Contact khippy
Website

  • Quote

Post by khippy » Sun Apr 10, 2011 7:45 pm

Code: Select all

host ~ # ls -l /bin/mount
-rws--x--x 1 16777214 16777214   85912 Apr  8 04:13 mount
I tried reinstalling sys-apps/util-linux-2.19 with no change.
There after I found that I have a couple of files belonging to group and user 16777214.
How can that come?
--
there are no silly questions
Top
khippy
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 79
Joined: Thu Aug 29, 2002 8:32 pm
Location: Braunschweig - Germany
Contact:
Contact khippy
Website

  • Quote

Post by khippy » Mon Apr 11, 2011 1:00 am

I found the reason for the error. I had extended my /var/tmp/portage directory by mounting it via bind with another directory from another harddisk:

/etc/fstab:

Code: Select all

/dev/sdb1               /mnt/cool       xfs             noatime         0 2
/mnt/cool/portage /var/tmp/portage none defaults,bind 0 0
When umounting /var/tmp/portage, emerging goes well.
When mounting /var/tmp/portage, the error occours.
So, WTF is causing this? It had worked for months.

Mounted:

Code: Select all

ghost ~ # ls -ld /var/tmp/portage
drwxrwxr-x 6 portage portage 72 Apr 11 02:53 /var/tmp/portage
Umounted:

Code: Select all

host ~ # ls -ld /var/tmp/portage
drwxrwxr-x 3 portage portage 4096 Apr 11 02:51 /var/tmp/portage
--
there are no silly questions
Top
Post Reply

4 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic