LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with mount disk for site. (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-mount-disk-for-site-795958/)

Fulgore 03-17-2010 03:14 AM

Problem with mount disk for site.
 
Hello.
Who can help me? I the beginner in linux. A problem in:
the root of site path: /var/www/html/foto
Gallery3 ned create directory "var"
cd /var/www/html/foto
mkdir var
chmod 777 var
this directory for content, and i want save content not in dir, i want save content in mount disk.
!!!create and mount disk in system
fdisk -l
fdisk /dev/sdb
mkfs -t ext3 /dev/sdb1
mount /dev/sdb1 /var/www/html/foto/var
cd /var/www/html/foto
chmod 777 var
All ready...but... Gallery3 can't see this directory "var"
In ssh i see dir
cd /var/www/html/foto
ls -al
total 124
drwxrwxrwx 9 root root 4096 Mar 17 09:48 .
drwxr-xr-x 3 root root 4096 Mar 16 21:49 ..
drwxr-xr-x 3 root root 4096 Feb 24 20:13 application
-rw-r--r-- 1 root root 2177 Feb 24 20:13 .htaccess
-rw-r--r-- 1 root root 3317 Feb 24 20:13 index.php
drwxr-xr-x 3 root root 4096 Feb 24 20:13 installer
drwxr-xr-x 8 root root 4096 Feb 24 20:13 lib
-rw-r--r-- 1 root root 18011 Feb 24 20:13 LICENSE
drwxr-xr-x 23 root root 4096 Feb 24 20:13 modules
-rw-r--r-- 1 root root 2873 Feb 24 20:13 README
-rw-r--r-- 1 root root 270 Feb 24 20:13 robots.txt
drwxr-xr-x 9 root root 4096 Feb 24 20:13 system
drwxr-xr-x 4 root root 4096 Feb 24 20:13 themes
drwxrwxrwx 4 root root 4096 Mar 17 09:50 var

in directory "var"
cd var
ls -al
total 40
drwxrwxrwx 4 root root 4096 Mar 17 09:50 .
drwxrwxrwx 9 root root 4096 Mar 17 09:48 ..
drwxr-xr-x 2 root root 4096 Mar 16 18:04 123
-rw-r--r-- 1 root root 0 Mar 17 09:50 123.html
drwx------ 2 root root 16384 Mar 16 15:45 lost+found

What is wrong???
Without mount disk all is good, gallery3 see the dir "var"
Help please.

freelinuxtutorials 03-17-2010 03:34 AM

first of all,are you mounting yourSAN? NFS?
who's Gallery3?Is that the hostname where you create the folder var under foto?
And what do you mean by this,pls.elaborate

"Without mount disk all is good, gallery3 see the dir "var""

Fulgore 03-17-2010 03:54 AM

Quote:

Originally Posted by freelinuxtutorials (Post 3901428)
first of all,are you mounting yourSAN? NFS?
who's Gallery3?Is that the hostname where you create the folder var under foto?
And what do you mean by this,pls.elaborate

"Without mount disk all is good, gallery3 see the dir "var""

Thanks for answer.
first - i'm use ESXi virtual machine... ops.. Has forgotten to tell
OS - CentOS 5.4
installed on Virtual machine with 256 RAM and 4Gb virtual HDD
On the server installed LAMP (Apache+MySQL+PHP)
Gallery3 it is a site (http://gallery.menalto.com/)
root dir for site gallery3 - /var/www/html/foto (http://localhost/foto)
Gallery request create dir "var" for store content in root site directory /var/www/html/foto/var

Quote:

We're having trouble creating a place for your photos. Can you help? Please create a directory called "var" using mkdir var in your gallery3 directory, then run chmod 777 var. That should fix it.
In system 4Gb HDD and i want mount new partition for gallery3, i want store content of Gallery3 /var/www/html/foto/var to new partition 100Gb.
In ESXi i shutdown CentOS, create 100Gb virtual HDD for CentOS and start the system, then im create new partition on new disk and format him with ext3...further it is described above
Why? I - do not know, I think it the most simple way (I the beginner...)

And with it:"Without mount disk all is good, gallery3 see the dir "var""
when i first create dir "var" in root directory of site, installer see "var" directory, and go to step 2 installer>>>> good and work
when i mount new disk in /var/www/html/foto/var and renew step 1 installer he say:

Quote:

We're having trouble creating a place for your photos. Can you help? Please create a directory called "var" using mkdir var in your gallery3 directory, then run chmod 777 var. That should fix it.
and if i go to http://localhost/foto/var i see

Quote:

Forbidden

You don't have permission to access /foto/var/ on this server."

freelinuxtutorials 03-17-2010 05:51 AM

Ok. i got it now. So your installing the opensource photo organizer "Gallery". And you cannot continue the installation when the var is mounted on the /var/www/html/foto/? right?

1. is it properly mounted after issuing mount /dev/sdb1 /var/www/html/foto/var? can you verify it using df command
2. can you write on var folder under /var/www/html/foto successfully?
e.g. cd /var/www/html/foto/var
touch test1
3. what's the ownership of /var/www/html/foto/var ?

Fulgore 03-17-2010 06:17 AM

Quote:

Originally Posted by freelinuxtutorials (Post 3901530)
Ok. i got it now. So your installing the opensource photo organizer "Gallery". And you cannot continue the installation when the var is mounted on the /var/www/html/foto/? right?

1. is it properly mounted after issuing mount /dev/sdb1 /var/www/html/foto/var? can you verify it using df command
2. can you write on var folder under /var/www/html/foto successfully?
e.g. cd /var/www/html/foto/var
touch test1
3. what's the ownership of /var/www/html/foto/var ?

Thanks.
Hmmm
Yes, i cannot continue the installation when the var is mounted in the /var/www/html/foto/
1. i use fstab for mount /dev/sdb1
Quote:

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/sdb1 /var/www/html/foto/var ext3 defaults 0 3
2. Yes i can do all operation under /var/www/html/foto use ssh (create folder 123 create 123.html file) and can do in the var mount folder.
3. here a listing permission folders
Quote:

[root@www /]# cd /var/www/html/foto
[root@www foto]# ls -al
total 124
drwxrwxrwx 9 root root 4096 Mar 17 09:48 .
drwxr-xr-x 3 root root 4096 Mar 16 21:49 ..
drwxr-xr-x 3 root root 4096 Feb 24 20:13 application
-rw-r--r-- 1 root root 2177 Feb 24 20:13 .htaccess
-rw-r--r-- 1 root root 3317 Feb 24 20:13 index.php
drwxr-xr-x 3 root root 4096 Feb 24 20:13 installer
drwxr-xr-x 8 root root 4096 Feb 24 20:13 lib
-rw-r--r-- 1 root root 18011 Feb 24 20:13 LICENSE
drwxr-xr-x 23 root root 4096 Feb 24 20:13 modules
-rw-r--r-- 1 root root 2873 Feb 24 20:13 README
-rw-r--r-- 1 root root 270 Feb 24 20:13 robots.txt
drwxr-xr-x 9 root root 4096 Feb 24 20:13 system
drwxr-xr-x 4 root root 4096 Feb 24 20:13 themes
drwxrwxrwx 4 root root 4096 Mar 17 09:50 var
[root@www foto]# cd var
[root@www var]# ls -al
total 40
drwxrwxrwx 4 root root 4096 Mar 17 09:50 .
drwxrwxrwx 9 root root 4096 Mar 17 09:48 ..
drwxr-xr-x 2 root root 4096 Mar 16 18:04 123
-rw-r--r-- 1 root root 0 Mar 17 09:50 123.html
drwx------ 2 root root 16384 Mar 16 15:45 lost+found

freelinuxtutorials 03-17-2010 06:28 AM

1.can you create a phpinfo.php file and see what's your _SERVER["DOCUMENT_ROOT"] ?
2.what's the user/group of httpd.conf? is it apache
then can u try
cd /var/www/html/foto
chown -R apache:apache var

i assumed the installation is done via browser,and it uses apache to write.Also please check your error_log of your http

Fulgore 03-17-2010 06:40 AM

Quote:

Originally Posted by freelinuxtutorials (Post 3901567)
1.can you create a phpinfo.php file and see what's your _SERVER["DOCUMENT_ROOT"] ?
2.what's the user/group of httpd.conf? is it apache
then can u try
cd /var/www/html/foto
chown -R apache:apache var

i assumed the installation is done via browser,and it uses apache to write.Also please check your error_log of your http

Thanks.
1. _SERVER["DOCUMENT_ROOT"] /var/www/html
2. in /etc/httpd/conf/httpd.conf
User apache
Group apache
3. yes, i try to change user and group, but not have results. Now to try - and not results
Quote:

[root@www conf]# cd /var/www/html/foto
[root@www foto]# chown -R apache:apache var
[root@www foto]# ls -al
total 132
drwxrwxrwx 9 root root 4096 Mar 17 13:32 .
drwxr-xr-x 3 root root 4096 Mar 16 21:49 ..
drwxr-xr-x 3 root root 4096 Feb 24 20:13 application
-rw-r--r-- 1 root root 2177 Feb 24 20:13 .htaccess
-rw-r--r-- 1 root root 3317 Feb 24 20:13 index.php
drwxr-xr-x 3 root root 4096 Feb 24 20:13 installer
drwxr-xr-x 8 root root 4096 Feb 24 20:13 lib
-rw-r--r-- 1 root root 18011 Feb 24 20:13 LICENSE
drwxr-xr-x 23 root root 4096 Feb 24 20:13 modules
-rw-r--r-- 1 root root 24 Mar 17 13:32 phpinfo.php
-rw-r--r-- 1 root root 2873 Feb 24 20:13 README
-rw-r--r-- 1 root root 270 Feb 24 20:13 robots.txt
drwxr-xr-x 9 root root 4096 Feb 24 20:13 system
drwxr-xr-x 4 root root 4096 Feb 24 20:13 themes
drwxrwxrwx 4 apache apache 4096 Mar 17 09:50 var
http://localhost/foto/var
Forbidden

You don't have permission to access /foto/var/ on this server.

Have any idea?

freelinuxtutorials 03-17-2010 06:50 AM

Quote:

Originally Posted by Fulgore (Post 3901583)
Thanks.
1. _SERVER["DOCUMENT_ROOT"] /var/www/html
2. in /etc/httpd/conf/httpd.conf
User apache
Group apache
3. yes, i try to change user and group, but not have results. Now to try - and not results

http://localhost/foto/var
Forbidden

You don't have permission to access /foto/var/ on this server.

Have any idea?

Is /foto/var already has files on it. Is directory indexing enable on httpd.conf? What's your http logs say?
Do you still encounter this error during installation
Quote:

We're having trouble creating a place for your photos. Can you help? Please create a directory called "var" using mkdir var in your gallery3 directory, then run chmod 777 var. That should fix it.

Fulgore 03-17-2010 07:09 AM

1. Yes of cose it is first step in search trouble:
i "on" indexing folder
and see permission on folders.
http log say
Quote:

when i launch http://localhost/foto/var
[Wed Mar 17 13:38:14 2010] [error] [client 80.253.19.114] File does not exist: /var/www/html/favicon.ico, referer: http://localhost/foto/var/
[Wed Mar 17 14:03:57 2010] [error] [client 80.253.19.114] (13)Permission denied: access to /foto/var/ denied
when i launch http://localhost/foto/
not have any error
....may be it is permission in apache config?

And last - yes i still have error
Quote:

We're having trouble creating a place for your photos. Can you help? Please create a directory called "var" using mkdir var in your gallery3 directory, then run chmod 777 var. That should fix it.

Fulgore 03-17-2010 08:25 AM

Is what be ideas? I can not understand with it in any way...

Fulgore 03-17-2010 09:37 AM

OK.
i use another variant.
umont /var/www/html/foto/var
mount /dev/sdb1 /mnt/var
cd /var/www/html/foto
rm var
ln -s /mnt/var var
cd /etc/httpd/conf
nano httpd.conf
search "Options Follow"
replace
"Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all"
save
/etc/init.d/httpd restart
That all
Error was gone!!!!

But i cant understand, why it not work with mount?

Fulgore 03-17-2010 09:55 AM

Sory i'm mistake

Fulgore 03-17-2010 10:02 AM

This variant don't work to
I surrender already, well as it to make?

Fulgore 03-18-2010 04:58 AM

Ur the problem is solved
Need off selinux, and all work - mount disk and symlink disk
Sorry and thanks for all

Post need close!


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