Using windows file system for web development on ubuntu
Linux - SoftwareThis 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.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Using windows file system for web development on ubuntu
Hi,
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?
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?
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.
@hjess
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.
@torchnw
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.