LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-17-2010, 03:14 AM   #1
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Rep: Reputation: 0
Exclamation 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.

Last edited by Fulgore; 03-17-2010 at 03:16 AM.
 
Old 03-17-2010, 03:34 AM   #2
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
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""
 
Old 03-17-2010, 03:54 AM   #3
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by freelinuxtutorials View Post
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."

Last edited by Fulgore; 03-17-2010 at 04:12 AM.
 
Old 03-17-2010, 05:51 AM   #4
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
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 ?
 
Old 03-17-2010, 06:17 AM   #5
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by freelinuxtutorials View Post
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
 
Old 03-17-2010, 06:28 AM   #6
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
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
 
Old 03-17-2010, 06:40 AM   #7
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by freelinuxtutorials View Post
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?

Last edited by Fulgore; 03-17-2010 at 06:41 AM.
 
Old 03-17-2010, 06:50 AM   #8
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
Quote:
Originally Posted by Fulgore View Post
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.
 
Old 03-17-2010, 07:09 AM   #9
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 03-17-2010, 08:25 AM   #10
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Is what be ideas? I can not understand with it in any way...
 
Old 03-17-2010, 09:37 AM   #11
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
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?

Last edited by Fulgore; 03-17-2010 at 10:10 AM.
 
Old 03-17-2010, 09:55 AM   #12
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Sory i'm mistake
 
Old 03-17-2010, 10:02 AM   #13
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
This variant don't work to
I surrender already, well as it to make?
 
Old 03-18-2010, 04:58 AM   #14
Fulgore
LQ Newbie
 
Registered: Mar 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Ur the problem is solved
Need off selinux, and all work - mount disk and symlink disk
Sorry and thanks for all

Post need close!
 
  


Reply


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
mount problem, new hard-disk itz2000 Linux - Newbie 16 10-07-2009 02:09 PM
scsi disk mount problem UltraSoul Linux - Software 2 04-24-2008 08:23 PM
External Disk Mount Problem JonBL Ubuntu 4 03-26-2007 07:18 AM
Mount hard disk problem jolly Linux - General 7 03-24-2006 10:36 PM
windowME disk mount problem murrayme Linux - General 5 05-28-2004 01:22 AM


All times are GMT -5. The time now is 12:53 AM.

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