perl scripts causing internal server error

bhanuprasad1981

Verified User
Joined
Feb 20, 2012
Messages
17
for my programms i dont need php only perl and apache, weirdly my perl scripts are returning 500 internal server error , i checked those have 755 chmod but still issue continues,logs show this:-

Code:
[2012-05-05 14:04:16]: uid: (512/antuantu) gid: (514/antuantu) cmd: dl.cgi
[2012-05-05 14:04:18]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:04:42]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:04:43]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: api.cgi
[2012-05-05 14:04:43]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: api.cgi
[2012-05-05 14:04:43]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: upload.cgi
[2012-05-05 14:04:48]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:04:51]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:05:03]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:05:03]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:05:04]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:05:09]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: api.cgi
[2012-05-05 14:05:09]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: api.cgi
[2012-05-05 14:05:09]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: upload.cgi
[2012-05-05 14:05:14]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:05:17]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:05:18]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi
[2012-05-05 14:05:23]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: api.cgi
[2012-05-05 14:05:23]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: api.cgi
[2012-05-05 14:05:23]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: upload.cgi
[2012-05-05 14:05:23]: uid: (512/antuantu) gid: (514/antuantu) cmd: dl.cgi
[2012-05-05 14:05:27]: uid: (510/antukdas) gid: (512/antukdas) cmd: dl.cgi


please help
 
not sure if its related to same issue i just found uploading files to those accounts give error :-

api.cgi has been saved as /home/disk8/bhanu7/domains/s12.uploadjet.net/public_html/cgi-bin/api.cgi.
Warning: Saved filesize is less than uploaded filesize. Check quotas.
Warning: Quota limit reached. File(s) may be empty.


atm quotacheck is running
 
disk is 1tb and max used till now 200gb

here are results

[root@a03s01 ~]# /sbin/quotacheck -avugm
quotacheck: Scanning /dev/mapper/vg-root [/] done
quotacheck: Checked 5795 directories and 50885 files
quotacheck: Can't create new quotafile //aquota.user.new: File exists
quotacheck: Cannot initialize IO on new quotafile: File exists
quotacheck: Can't create new quotafile //aquota.group.new: File exists
quotacheck: Cannot initialize IO on new quotafile: File exists
quotacheck: Scanning /dev/sdi1 [/home/disk8] quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
quotacheck: Cannot stat old user quota file: No such file or directory
quotacheck: Cannot stat old group quota file: No such file or directory
done
quotacheck: Checked 84 directories and 3809 files
quotacheck: Old file not found.
quotacheck: Old file not found.
[root@a03s01 ~]# /sbin/quotaon -a
[root@a03s01 ~]# quota -v bhanu7
Disk quotas for user bhanu7 (uid 508):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/vg-root
0 0 0 0 0 0
/dev/sdi1 44072900 0 0 494 0 0


please help
 
Last edited:
I can't understand what you're trying to do there. When and how do you get an error? How does uploading relate with your error?
 
main issue was internal server error i was uploading files as root as they were generating 500 error i thought its permission issue, so i use bhanu7 ftp account but weirdly all uploaded files were 0byte , tried to upload from directadmin panel where i saw this quota error as i mentioned in last post i have lot of space on that disk but still ftp uploads as users are failing i have tried to make user unlimited space too but it didnt work, i tried to check quota but quota file for that disk doesn't exist

Code:
quotacheck: Scanning /dev/sdi1 [/home/disk8] quotacheck: Cannot stat old user quota file: No such file or directory

i tried to enable quota check and check back again quota

Code:
[root@a03s01 ~]# quota -v bhanu7
Disk quotas for user bhanu7 (uid 508):
Filesystem blocks quota limit grace files quota limit grace
/dev/mapper/vg-root
0 0 0 0 0 0
/dev/sdi1 44072900 0 0 494 0 0

without fixing quota issue site cant run as even basic script files needs to be uploaded as user.
 
i uploaded files using sftp i get internal server error :-

suexec log :-

Code:
[2012-05-07 04:17:38]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: api.cgi
[2012-05-07 04:17:39]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: api.cgi
[2012-05-07 04:17:39]: uid: (508/bhanu7) gid: (510/bhanu7) cmd: upload.cgi

domain error log :-

Code:
[Mon May 07 04:17:39.141215 2012] [cgi:error] [pid 10141] [client 89.248.162.147:47951] AH01215: XFSConfig.pm did not return a true value at api.cgi line 4.
[Mon May 07 04:17:39.141393 2012] [cgi:error] [pid 10141] [client 89.248.162.147:47951] AH01215: BEGIN failed--compilation aborted at api.cgi line 4.
[Mon May 07 04:17:39.141595 2012] [cgi:error] [pid 10141] [client 89.248.162.147:47951] End of script output before headers: api.cgi
[Mon May 07 04:17:39.174449 2012] [cgi:error] [pid 10614] [client 89.248.162.147:47952] AH01215: XFSConfig.pm did not return a true value at upload.cgi line 6.
[Mon May 07 04:17:39.174595 2012] [cgi:error] [pid 10614] [client 89.248.162.147:47952] AH01215: BEGIN failed--compilation aborted at upload.cgi line 6.
[Mon May 07 04:17:39.174746 2012] [cgi:error] [pid 10614] [client 89.248.162.147:47952] End of script output before headers: upload.cgi
 
ls -la /full/path/to/api.cgi
ls -ld /full/path/to/directory/of/api.cgi


Code:
[root@a03s01 ~]# ls -la /home/disk8/bhanu7/domains/s12.uploadjet.net/public_html/cgi-bin/api.cgi
-rw-r--r-- 1 bhanu7 bhanu7 0 May  7 06:51 /home/disk8/bhanu7/domains/s12.uploadjet.net/public_html/cgi-bin/api.cgi
[root@a03s01 ~]# ls -la /home/disk8/bhanu7/domains/s12.uploadjet.net/public_html/cgi-bin/
total 132
drwxr-xr-x 7 bhanu7 bhanu7  4096 May  7 06:51 .
drwxr-xr-x 6 bhanu7 bhanu7  4096 Apr 26 10:23 ..
-rw-r--r-- 1 bhanu7 bhanu7     0 May  7 06:51 api.cgi
drwxr-xr-x 2 bhanu7 bhanu7  4096 May  7 04:15 backup
-rwxr-xr-x 1 bhanu7 bhanu7  1641 Apr 26 10:21 dl.cgi
-rw-r--r-- 1 bhanu7 bhanu7   563 Apr 26 10:21 .htaccess
drwxr-xr-x 2 bhanu7 bhanu7  4096 Apr 26 10:21 ImportFiles
-rwxr-xr-x 1 bhanu7 bhanu7  3573 Apr 26 10:21 install_fs.cgi
drwxr-xr-x 7 bhanu7 bhanu7  4096 Apr 26 10:21 Modules
drwxrwxrwx 2 bhanu7 bhanu7  4096 May  4 20:00 temp
-rwxr-xr-x 1 bhanu7 bhanu7   571 Apr 26 10:21 up.cgi
-rwxr-xr-x 1 bhanu7 bhanu7   643 Apr 26 10:21 up_flash.cgi
-rwxr-xr-x 1 bhanu7 bhanu7 26007 Apr 26 10:21 upload.cgi
drwxrwxrwx 6 bhanu7 bhanu7  4096 May  4 20:00 uploads
-rwxr-xr-x 1 bhanu7 bhanu7  1097 Apr 26 10:21 uu.cgi
[root@a03s01 ~]#
 
It should be

ls -ld /home/disk8/bhanu7/domains/s12.uploadjet.net/public_html/cgi-bin/

and your

/home/disk8/bhanu7/domains/s12.uploadjet.net/public_html/cgi-bin/api.cgi

should be chmoded to rwxr-xr-x (755)
 
[root@a03s01 ~]# ls -ld /home/disk8/bhanu7/domains/s12.uploadjet.net/public_html/cgi-bin/
drwxr-xr-x 7 bhanu7 bhanu7 4096 May 7 06:51 /home/disk8/bhanu7/domains/s12.uploadjet.net/public_html/cgi-bin/

also i now did chmod 755 api.cgi
 
ohh yes that's because when ever i try upload any file to that specific disk i get quota error and all uploaded files are 0byte


there are 9 instances of same scripts running on that server one instance is hosted on separate disks rest of 8 scripts are running fine only this one not working
 
[root@a03s01 ~]# mount
/dev/mapper/vg-root on / type ext3 (rw,usrquota,grpquota)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/mapper/vg-tmp on /tmp type ext3 (rw)
/dev/hda1 on /boot type ext2 (rw)
/dev/sdb1 on /home/disk2 type ext3 (rw,usrquota,grpquota)
/dev/sdc1 on /home/disk3 type ext3 (rw,usrquota,grpquota)
/dev/sdd1 on /home/disk4 type ext3 (rw,usrquota,grpquota)
/dev/sde1 on /home/disk5 type ext3 (rw,usrquota,grpquota)
/dev/sdf1 on /home/disk6 type ext3 (rw,usrquota,grpquota)
/dev/sdg1 on /home/disk7 type ext3 (rw,usrquota,grpquota)
/dev/sdi1 on /home/disk8 type ext3 (rw,usrquota,grpquota)
/dev/sdj1 on /home/disk9 type ext3 (rw,usrquota,grpquota)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
[root@a03s01 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg-root 896G 74G 776G 9% /
/dev/mapper/vg-tmp 992M 34M 907M 4% /tmp
/dev/hda1 244M 9.1M 222M 4% /boot
/dev/sdb1 917G 65G 806G 8% /home/disk2
/dev/sdc1 917G 66G 806G 8% /home/disk3
/dev/sdd1 917G 72G 800G 9% /home/disk4
/dev/sde1 917G 72G 800G 9% /home/disk5
/dev/sdf1 917G 69G 802G 8% /home/disk6
/dev/sdg1 917G 69G 803G 8% /home/disk7
/dev/sdi1 76G 72G 0 100% /home/disk8
/dev/sdj1 917G 163G 709G 19% /home/disk9
tmpfs 2.0G 0 2.0G 0% /dev/shm
[root@a03s01 ~]#



as per above stats does that mean disk 8 is just 76g ? how come that disk is sure 1tb sata :s
 
Back
Top