# Segmentation fault chown

## Robin79

hi i get this error but dont know how to get rid of it

5419 Segmentation fault      chown -R 0:0 "$target/$1"

----------

## moocha

Hello. Unfortunately, our telepathic facilities are offline at the moment and we can't directly extract from your mind your system details (emerge --info output) and the exact circumstances in which you're seeing that error. Until such time as they're fully operational again, could you perhaps be so kind and help us help you?  :Smile:  Thanks!

----------

## Robin79

```

Portage 2.1.2.2 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r2, 2.6.20-gentoo-r8 i686)

=================================================================

System uname: 2.6.20-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 3.20GHz

Gentoo Base System release 1.12.9

Timestamp of tree: Sun, 13 May 2007 07:20:01 +0000

dev-lang/python:     2.4.4

dev-python/pycrypto: 2.0.1-r5

sys-apps/sandbox:    1.2.17

sys-devel/autoconf:  2.13, 2.61

sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10

sys-devel/binutils:  2.16.1-r3

sys-devel/gcc-config: 1.3.15-r1

sys-devel/libtool:   1.5.22

virtual/os-headers:  2.6.17-r2

ACCEPT_KEYWORDS="x86"

AUTOCLEAN="yes"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-O2 -mtune=i686 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"

CXXFLAGS="-O2 -mtune=i686 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks metadata-transfer sandbox sfperms strict"

GENTOO_MIRRORS="http://mirror.gentoo.no/ ftp://ftp.du.se/pub/os/gentoo http://ftp.du.se/pub/os/gentoo http://ds.thn.htu.se/linux/gentoo "

MAKEOPTS="-j2"

PKGDIR="/usr/portage/packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="acl acpi alsa arts berkdb bitmap-fonts cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde kerberos ldap libg++ mad midi mikmod mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssh ssl svg tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs x86 xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mga neomagic nsc nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"

Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

its when using  a script in glftpd

----------

## moocha

Ah, I had guessed it was somewhere in the baselayout scripts. I'm afraid there's still not enough information to pin it down. Can you post the script in question? Until then (shooting in the dark here) can you try to

```
emerge --oneshot sys-apps/coreutils app-shells/bash net-ftp/glftpd
```

(after first checking with --pretend --verbose to see if it behaves, of course) and then to restart glftpd?

----------

## Robin79

I have compiled glftpd myself since the emerge does soem settings i dont like the script the whole one or? just the error line

----------

## moocha

If it's not a big script, then the entire file (it would be easier to debug) - but I hope it should be enough to post, say, the section comprising 10 or so lines before and after the failing one, to put it into context.

----------

## Robin79

its pretty big but you can download it from here http://www.grandis.nu/glftpd/scripts/eur0dance/eur0-pre-system_v1.0.tar.gz its the pre.sh file

A alkos found somone wioth the same error on the grandis forum but no solution except this

 *Quote:*   

> 
> 
> i have new problem after upgrade of my distro
> 
> Segmentation fault /bin/chown -R 0:0 $1 
> ...

 

dont understand with he means tough

----------

## moocha

 *Robin79 wrote:*   

> A alkos found somone wioth the same error on the grandis forum but no solution except this
> 
>  *Quote:*   
> 
> i have new problem after upgrade of my distro
> ...

 Neither do I - his post wasn't very informative  :Smile: . I'll try to look through it and reproduce the problem. Until then, try my suggestion above (re-emerging of coreutils and bash, without glftpd).

----------

## Robin79

i have tried it getting same error

----------

## moocha

Hum. Okay, shot in the dark again but for the moment it's the best we have to go on: Try re-emerging gcc via

```
emerge --oneshot sys-devel/gcc
```

After it finishes, please run gcc-config and set the compiler again forcibly to the newly emerged version, after which please run

```
env-update

source /etc/profile
```

Then re-emerge coreutils and bash again, and recompile your glftpd version and restart it.

----------

## Robin79

i emerged the latest version (wich was the same as i had) and did it all but still wont work

----------

## Robin79

Nothing new  :Sad: 

----------

## moocha

Neither here, sorry...

----------

## Robin79

Anyone who got an answer? Somone most know

----------

## jmbsvicetto

Hi.

Do you get this error on a single partition or dir? Is this a local disk or a network mounted dir? Have you tried using strace? You might also want to take a look at the following links, in particular the last 2:

http://www.gentoo.org/doc/en/bugzilla-howto.xml

http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap2

http://www.gentoo.org/doc/en/bugzilla-howto.xml#doc_chap3

----------

## Robin79

hi its a local disk and one partition

----------

## jmbsvicetto

I would suggest you to try debugging this error with strace, look the links in my previous post, and or to submit a new bug about this. You should attach the file, and not the tarball, to the bug.

You should also use portage to install the package.

----------

## Robin79

can you fint that script in portage?  :Razz: 

----------

