Web Hosting Talk







View Full Version : permission denied


Omair Haroon
08-15-2001, 01:23 PM
Hello,

Often when I try to upload scripts and so to my clients website I get a Permission Denied Error...

Why is it so..

I log in as admin and when go to clients dir like /home/sites/site20/web

I get an Permission Denied Error...

Why is it so ?
Any idea ??

(SH)Saeed
08-15-2001, 02:05 PM
Perl/CGI scripts must be set to the permission 755 (chmod 755). This means that after you upload a script to your server, you have to change its permission to 755. Don't forget to upload your scripts in ASCII mode and not in BINARY.

Omair Haroon
08-15-2001, 02:11 PM
I think you are not getting my question..

The FTP Client does not uploads it and gives the error..

Am I clear now ??

(SH)Saeed
08-15-2001, 02:13 PM
Oh, I see. Well, then there could be two (2) reasons..

1. You do not have permission to upload (write) to that directory
2. The partition is full

Omair Haroon
08-15-2001, 02:21 PM
How can it be..

16Gb of free hard disk..
10mb free space on the account

how can't I don't have permission as being an admin ??


' Omair

(SH)Saeed
08-15-2001, 02:25 PM
Try changing the permission of the directory you're uploading to to 777 and try again. Because if you have enough space, then that is the only other thing I can think of.

Omair Haroon
08-15-2001, 02:30 PM
Nah!

I can't chmod 777 a clients web directory..
anyone else..

atiep
08-15-2001, 02:41 PM
Originally posted by Omair Haroon
Hello,

Often when I try to upload scripts and so to my clients website I get a Permission Denied Error...

Why is it so..

I log in as admin and when go to clients dir like /home/sites/site20/web

I get an Permission Denied Error...

Why is it so ?
Any idea ??

what is you userid anyway...
are you telling us that your used id admin and your homedir is
/home/sites/site20/web ?? is it suppose to be you had site20 userid instead admin ???

if you can telnet / ssh to the account
can you type "quota" (without quote sign) and copy paste the result ? and go to direktory /home/sites/site20/
and type "ls -all" and copy paste here the result...

(SH)Saeed
08-15-2001, 02:42 PM
Originally posted by Omair Haroon
Nah!

I can't chmod 777 a clients web directory..
anyone else..

Well, you know that on a RAQ, when you login as admin, you have only access to all directories when you have less than 20-30 accounts on that server. When you have more accounts, you have to su to root to have full access to all directories.

Mike
08-15-2001, 02:43 PM
The user "admin" does not have priveliges to write to a user's directory - The admin account is not a root account.

You could telnet to the box, su to root and change ownership of directories (etc) so that admin can write, or change directories to 777 - But, that's not advisable, as chaning ownership to admin will disallow the user from writing to his directory.

But, the best bet is to login using the account's login/password as this login already has privs to write to that particular directory.

atiep
08-15-2001, 02:43 PM
what is exactly the error message ? to make everyone happy
you might capture the error message and had it as screenshot and upload here... ?

(SH)Saeed
08-15-2001, 02:44 PM
Originally posted by atiep


what is you userid anyway...
are you telling us that your used id admin and your homedir is
/home/sites/site20/web ?? is it suppose to be you had site20 userid instead admin ???

I think he's logging in as Admin and he wants to upload files to a users directory.

atiep
08-15-2001, 02:49 PM
Originally posted by Mr. Amazon


I think he's logging in as Admin and he wants to upload files to a users directory.

ouggh..

Omair Haroon:
if you still have to upload your client file.. without changing 'site20' password... and you have root password

ssh to your server then upload all the file with 'RZ modem' (this can be handle by secure crt program) , than make neccesary change to all the ownership and group so 'site20' can change the file any other time they feel like it...

Omair Haroon
08-15-2001, 03:10 PM
Ohh Come'on guys...


Here is the actuall problem..

I am using CuteFTP.. I am using the following info to login

Host : main.raq.ip.address
User Name : admin
Password : admin-pass

When I am connected, I switch on to /home
and then I move to the appropriate dir.. that is
/home/sites/site20/web

and then when I try to upload a file I get this error..


COMMAND:> TYPE A
200 Type set to A.
STATUS:> Sending config.inc.php
COMMAND:> PORT 202,163,111,157,7,34
200 PORT command successful.
COMMAND:> STOR config.inc.php
550 config.inc.php: Permission denied
ERROR:> File error
STATUS:> Failed to send c:\windows\desktop\phpmyadmin\phpmyadmin-2.2.0-rc4\config.inc.php
COMMAND:> pwd
257 "/home/sites/site20/web/phpmyadmin" is current directory.
COMMAND:> TYPE A
200 Type set to A.
STATUS:> Retrieving directory listing...
COMMAND:> PORT 202,163,111,157,7,36
200 PORT command successful.
COMMAND:> LIST
150 Opening ASCII mode data connection for file list.
226 Transfer complete.
STATUS:> Received 0 bytes Ok.
STATUS:> Time: 0:00:01, Efficiency: 0.00 KBytes/s (0 bytes/s)
STATUS:> Done.



I think I am quite clear by now...

atiep
08-15-2001, 03:15 PM
i think mike post already answering your question..

The user "admin" does not have priveliges to write to a user's directory - The admin account is not a root account.

Omair Haroon
08-15-2001, 03:25 PM
then how come I have been doing it before ???

atiep
08-15-2001, 03:30 PM
Originally posted by Omair Haroon
then how come I have been doing it before ???


REALLY ???
then i think is security issue before.. but now your admin already have it fixed by now... CMIW :confused: .. do you happend' had 'ROOT' password beside 'admin' password :confused:

(SH)Saeed
08-15-2001, 04:57 PM
Originally posted by Omair Haroon
then how come I have been doing it before ???

I already answered this question! It would really help if you read all of the replies to your post!

Here's what I said before:

Originally posted by Mr. Amazon
Well, you know that on a RAQ, when you login as admin, you have only access to all directories when you have less than 20-30 accounts on that server. When you have more accounts, you have to su to root to have full access to all directories.

Omair Haroon
08-16-2001, 08:26 AM
then how did I uploaded it day before yesterday and I have'nt added any websites after that...


:mad:

broken
08-16-2001, 01:20 PM
This is a Linux limitation - Admin account may only be a part of 32 groups, as Mr.Amazon said. I've seen this happen to people with only 5 virtual sites on their box, and it's happened out of the blue to others...Also for clarity's sake, the Admin account is able to upload and edit files in user directories...as long as Admin belongs to less than 32 groups.

To save yourself the hassle you should upload your files as the Site-Admin not as the server admin.

Anyways...you're going to have to change owner and group (chown and chgrp) of those files and then use the new corresponding login from now on.