Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
I have installed and configured Apache 2.2.9 with php 5.2.6, everything working fine. But my requirement is to have an existing windows share use as DocumentRoot.
I mount the share with this command:
mount -t cifs //server/share /abc/wwwroot -o rw,domain=xxx,username=xxxx,password=xxxx,uid=apache2,gid=www
Mount is successful but when I change my documentroot in httpd.conf to the mounted folder (/abc/wwwroot), only I can see a blank page in the browser when I try to access any page.
I see the file and directory permissions of the wwwroot folder change after mounting the share and perhaps that's is causing the problem.
Any ideas for getting the above done?
Thanks in advance.
--Dipu
-----------
You know, windows didn't get that bad over night! It took fifteen years of careful development!
You might have to create an "apache" account on the Windows machine and use those credentials to mount the share. Do not forget to give the apache account access to the files in the directory you want to share.
Ok, I created a account apache2 in AD server. As the share is accessible to "everyone", I don't have to give any specific permission. Even I mounted the share after authenticating with apache2 account. But still no luck. This was the exact command I issued:
mount -t cifs //neuron/webdev test/ -o domain=emx,username=apache2,rw,uid=apache2,gid=www,password=xxxxx
After mount, I did ls and the permissions are like the below for all dir, subdir and files. I get permission denied error when I try to change permissions. I think the sticky bit and permissions are causing problem.
Of course I can because I am specifying uid & gid of user "apache" while mounting. When I do "ls", I see the all the files highlighted yellow which make them look foreign files.
The -rwxrwSrwt & drwxrwxrwx permission looks the real culprit to me. How to get rid of that sticky bit from every file and how to set desired permission?
--Dipu
-----------
You know, windows didn't get that bad over night! It took fifteen years of careful development!
Of course I can because I am specifying uid & gid of user "apache" while mounting. When I do "ls", I see the all the files highlighted yellow which make them look foreign files.
I would like to believe you, but I would also like you to try "su apache" and then cat the files.
Quote:
Originally Posted by dipuasks
The -rwxrwSrwt & drwxrwxrwx permission looks the real culprit to me. How to get rid of that sticky bit from every file and how to set desired permission?
I played around with cifs here and had some problems. Then I found this post:
I have the sticky bit set on my files, but I am able to cat them as root. I also used su to switch to a less privileged user, and I could still cat the files. The only thing I have not tried is to use Apache with the mounted directory.
Last edited by David1357; 08-22-2008 at 10:39 AM.
Reason: Added more info about using cifs
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.