Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Emerging programs that create symlinks/chown files on FAT32
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Angel666
n00b
n00b


Joined: 14 Nov 2003
Posts: 45
Location: Palo Alto, CA

PostPosted: Wed Apr 28, 2004 1:04 am    Post subject: Emerging programs that create symlinks/chown files on FAT32 Reply with quote

So here is my problem: i dual boot my machine with windows. In order to have my webserver running locally able to serve pages both in windows and in gentoo, i put my htdocs dir in the windows FAT32 partition, mounted at /mnt/windows. A symlink, from /var/www/localhost/htdocs/ to /mnt/windows/htdocs/ servers to install all programs there.

But recently. when i wanted to install phpBB and piwi, both installations failed because they try to chown a file in the htdocs dir, which is not allowed since it is a FAT32 dir. Here is the error:

Code:
>>> /var/www/localhost/htdocs/piwi/
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2599, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1555, in merge
    retval=portage.doebuild(y,"merge",myroot,self.pkgsettings,edebug)
  File "/usr/lib/portage/pym/portage.py", line 2369, in doebuild
    return merge(mysettings["CATEGORY"],mysettings["PF"],mysettings["D"],mysettings["BUILDDIR"]+"/build-info",myroot,mysettings,myebuild=mysettings["EBUILD"])
  File "/usr/lib/portage/pym/portage.py", line 2491, in merge
    return mylink.merge(pkgloc,infloc,myroot,myebuild)
  File "/usr/lib/portage/pym/portage.py", line 5919, in merge
    return self.treewalk(mergeroot,myroot,inforoot,myebuild,cleanup=cleanup)
  File "/usr/lib/portage/pym/portage.py", line 5549, in treewalk
    if self.mergeme(srcroot,destroot,outfile,secondhand,"",cfgfiledict,mymtime):
  File "/usr/lib/portage/pym/portage.py", line 5826, in mergeme
    if self.mergeme(srcroot,destroot,outfile,secondhand,offset+x+"/",cfgfiledict,thismtime):
  File "/usr/lib/portage/pym/portage.py", line 5826, in mergeme
    if self.mergeme(srcroot,destroot,outfile,secondhand,offset+x+"/",cfgfiledict,thismtime):
  File "/usr/lib/portage/pym/portage.py", line 5826, in mergeme
    if self.mergeme(srcroot,destroot,outfile,secondhand,offset+x+"/",cfgfiledict,thismtime):
  File "/usr/lib/portage/pym/portage.py", line 5826, in mergeme
    if self.mergeme(srcroot,destroot,outfile,secondhand,offset+x+"/",cfgfiledict,thismtime):
  File "/usr/lib/portage/pym/portage.py", line 5826, in mergeme
    if self.mergeme(srcroot,destroot,outfile,secondhand,offset+x+"/",cfgfiledict,thismtime):
  File "/usr/lib/portage/pym/portage.py", line 5822, in mergeme
    os.chown(mydest,mystat[4],mystat[5])
OSError: [Errno 1] Operation not permitted: '/var/www/localhost/htdocs/piwi/Docs'


I was wondering if there was an elegant way of fixing this (e.g. without temporarily moving directories around). Anyone have any idea?
_________________
"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Fuhrer" - Adolf Hitler
Back to top
View user's profile Send private message
moocha
Watchman
Watchman


Joined: 21 Oct 2003
Posts: 5722

PostPosted: Thu Apr 29, 2004 7:27 am    Post subject: Reply with quote

If you don't need write access from Windows 2000/XP to the ext2/ext3 partitions you can use the ext2/3 installable file system driver from http://ext2.yeah.net to give you read-only access to the ext2/3 partition on which htdocs resides.
I strongly advise you against enabling write access via this driver to your ext2 file systems. Trust me on this :). If you're using ext3 file systems it's read only anyway since writing to ext3 isn't supported.
Under Windows 2000 you can use the Disk Manager MMC snap-in to (un)mount the partitions as drives or under a NTFS folder (the last method is preferable since you can place appropiate permissions on that folder before you mount the file systems). Under XP it doesn't seem to work via Disk Management and you have to use the mount utility that comes with the driver (or comes separately from the same site, I can't remember) to assign drive letters to the ext2/3 file systems - no access control on them, sadly.
Be warned though that using this driver creates a gaping security hole, especially if you mount the root file system (read access to /etc/shadow for anyone, for example :) ).
_________________
Military Commissions Act of 2006: http://tinyurl.com/jrcto

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety."
-- attributed to Benjamin Franklin
Back to top
View user's profile Send private message
Souperman
Guru
Guru


Joined: 14 Jul 2003
Posts: 449
Location: Cape Town, South Africa

PostPosted: Thu Apr 29, 2004 7:31 am    Post subject: Re: Emerging programs that create symlinks/chown files on FA Reply with quote

Angel666 wrote:
I was wondering if there was an elegant way of fixing this (e.g. without temporarily moving directories around). Anyone have any idea?

Perhaps you'd have better luck not using the Apache ebuild's default location for htdocs, i.e. leave/var/www/localhost alone and just configure Apache to use /mnt/windows/htdocs. Worth a try.
_________________
moo
Back to top
View user's profile Send private message
Angel666
n00b
n00b


Joined: 14 Nov 2003
Posts: 45
Location: Palo Alto, CA

PostPosted: Thu Apr 29, 2004 10:18 pm    Post subject: Reply with quote

moocha wrote:
If you don't need write access from Windows 2000/XP to the ext2/ext3 partitions you can use the ext2/3 installable file system driver from http://ext2.yeah.net to give you read-only access to the ext2/3 partition on which htdocs resides.


wow.. thanks! i had actually been looking around for some way to do this, and i hadn't found any drivers at all. and yes, i am running windows 2000, so i will use Disk Manager to make it even easier.

i dont even use windows that much anymore - now all its for is updating my ipod (i don't trust gtkpod with my 30 gb of music _quite_ yet) and running some specific apps.
_________________
"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Fuhrer" - Adolf Hitler
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum