Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-14-2011, 05:24 AM   #1
LQ Newbie
Registered: Mar 2006
Distribution: Ubuntu
Posts: 14

Rep: Reputation: 0
Using windows file system for web development on ubuntu


I have a dual boot Win XP & Ubuntu configuration.
I've recently revived my Ubuntu installation and upgraded to 11.04 after it became corrupted a couple of years ago.
I do web development under php, apache & mysql on my XP setup, and wanted to do the same on my Ubuntu installation, so I installed all the relevant software and everything is working.
BUT, here is my question:
Can I use my existing web site documents on my windows drive for development under Ubuntu? The file system is mounted and I can see all the files, but I'm aware linux uses different permissions (the chmod bit flags etc) so I guess I cannot chmod them to what they need to be? I kept getting unauthorised errors from apache, so copied my web root folder from my XP drive to my linux drive, then I could set the permissions and everything worked. But I wondered if there is any way I can get this to work without copying my files?

Old 09-15-2011, 03:48 PM   #2
LQ Newbie
Registered: Sep 2008
Posts: 2
Blog Entries: 1

Rep: Reputation: 0
Funny, that's almost exactly how I work: my system is a dual-boot, WUBI system (WUBI: linux filesystem is a single NTFS file). All of my configured DOCUMENT_ROOTs are symbolic links to regular NTFS directories. I've had no problem getting Apache to serve them up properly, whether I boot to Ubuntu or Windows.

(I *do* have separate Ubuntu & Windows Apache installations, of course, each with its own set of config files.)

I use SSI on some projects, so files need to be marked executable; but chmod seems to work happily on those NTFS files. When you use chmod on your Windows files, does it complain, fail silently, pretend to succeed? What does ls report about those files?


Old 09-15-2011, 03:57 PM   #3
LQ Newbie
Registered: Jun 2008
Distribution: Ubuntu, Debian, Mint, Fedora, Arch
Posts: 23

Rep: Reputation: 4
You could try setting the "uid=xxx" and "gid=yyy" option in /etc/fstab. ( Replace xxx and yyy with the apropriate UID and GID. ) This will make xxx and yyy owner and group of ALL files on the drive.

You can also set the "umask=" option in fstab to further restrict file permissions based on the owner and group. ( Ex: umask=027 yields permissions of 750 ) Note that this will still affect ALL files and directories.

Example /etc/fstab entry:
/dev/sda1 /mnt/windows ntfs uid=105,gid=108,umask=007

I presume this is just for development and testing? I would not recommend this on an apache installation that's reachable from the internet, for security reasons.
Old 09-16-2011, 02:47 PM   #4
LQ Newbie
Registered: Mar 2006
Distribution: Ubuntu
Posts: 14

Original Poster
Rep: Reputation: 0
chmodding doesn't report any errors, but when I examine the permissions afterwards, it hasn't changed and stays at 700 or drwx------ for folders and 600 for files.

I think you are right - it is something to do with the way my xp drive is mounted. I unmounted it and then mounted it manually and specified umask=000 and I was then able to set permissions, and apache would serve the files.

Annoyingly this drive does not auto mount on boot up so there is no entry in fstab. I will have to do some research to see what I need to add to it.
Yes, this is for dev only.


filesystems, permissions, php5 apache mysql

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What operating system is better for web development. kuzco Programming 11 07-15-2010 05:05 PM
Using Ubuntu serving for windows - File system dilemma Ark9 Linux - Newbie 1 06-02-2009 12:07 AM
Ubuntu Web Development solution Talon21 Ubuntu 4 07-28-2008 06:33 PM
Setting group automatically upon file creation (local web development configuration) jht2k Linux - Newbie 1 02-11-2005 07:05 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration