FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 07-26-2010, 10:28 PM
Jordon Bedwell
 
Default permission denied

On 7/26/10 4:35 PM, Jimmi Nielsen wrote:

Hello.

i have a small problems with my debian server.
alle files are permission 644/600 or something, so i can't change anything
on it.
how can i change it back with root login.

i have try but it say Permission denied
i try to login with SSH but it say permission denied
how can i change this.



The only way to do this would be trough a console, or some companies
offer the ability to repair permissions [for example server beach has a
utility for this]. As soon as you login to console and repair the
permissions [for SSH first and only ~ at first], make sure you the first
thing you do is block ALL external communications outside of port 80 and
SSH [or all communications outside at all ~ if you're in a console
session, stay in console and just lock all communications] as your
server might have been hacked. Coming from somebody who does security,
this is the first thing I would do, lock down SSH so you can't get in
and fix anything right away. If you can't get to a console, call the
company that hosts it, and ask them if they can repair SSH for you and
verify it's integrity (which they should be willing to do at the least)
and if they can't, I guess you're screwed unless you get physical access.



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: 4C4E0C06.6020406@envygeeks.com">http://lists.debian.org/4C4E0C06.6020406@envygeeks.com
 
Old 04-08-2012, 01:13 PM
Karl-Arne Gjersøyen
 
Default Permission Denied

Hello.
I am not sure this have to do with my Ubuntu server or it have to do
with the PHP installation.

When using file_put_contents() in PHP I got this error:
Warning: file_put_contents(3128a463470a06f833c9787fdf0c58dc .png)
[function.file-put-contents]: failed to open stream: Permission denied
in /home/test/public_html/cptcha.php on line 62

Here is the directory and the permittion on my server:

ls -l /
drwxr-xr-x 8 root root 4096 2012-04-08 13:30 home

ls -l /home/
drwxr-xr-x 4 test test 4096 2012-04-08 13:31 test

ls -l /home/test/
drwxr-xr-x 2 test test 4096 2012-04-08 14:54 public_html

karl@ubuntu:~$ ls -l /home/test/public_html/
totalt 772
-rw-r--r-- 1 test test 778552 2012-04-08 13:58 arial.ttf
-rw-r-r-- 1 test test 1670 2012-04-08 14:54 cptcha.php
-rw-r--r-- 1 test test 1709 2012-04-08 14:43 spamTest.php
karl@ubuntu:~$

Hope you can help me.
Thanks for your time!

Karl
--
Hjemmeside: http://www.karl-arne.name/
Homepages: http://blog.karl-arne.name/

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 04-08-2012, 01:44 PM
Kyle Johnson
 
Default Permission Denied

On Apr 8, 2012 9:13 AM, "Karl-Arne Gjersøyen" <karlarneg@gmail.com> wrote:

>

> Hello.

> I am not sure this have to do with my Ubuntu server or it have to do

> with the PHP installation.

>


Hello.* Your issue seems to be a file permission problem.


> When using file_put_contents() in PHP I got this error:

> Warning: file_put_contents(3128a463470a06f833c9787fdf0c58dc .png)

> [function.file-put-contents]: failed to open stream: Permission denied

> in /home/test/public_html/cptcha.php on line 62

>

> Here is the directory and the permittion on my server:

>

> ls -l /

> drwxr-xr-x * 8 root root *4096 2012-04-08 13:30 home

>

> ls -l /home/

> drwxr-xr-x 4 test * test * 4096 2012-04-08 13:31 test

>

> ls -l /home/test/

> drwxr-xr-x 2 test test 4096 2012-04-08 14:54 public_html

>

> karl@ubuntu:~$ ls -l /home/test/public_html/

> totalt 772

> -rw-r--r-- 1 test test 778552 2012-04-08 13:58 arial.ttf

> -rw-r-r-- 1 test test * 1670 2012-04-08 14:54 cptcha.php

> -rw-r--r-- 1 test test * 1709 2012-04-08 14:43 spamTest.php

> karl@ubuntu:~$

>


Webservers, on Ubuntu, usually run as the www-data user.* Either chown this directory to www-data, or make the permissions more open by letting "other" write:* chmod o+wx .


> Hope you can help me.

> Thanks for your time!

>

> Karl

> --

> Hjemmeside: http://www.karl-arne.name/

> Homepages: http://blog.karl-arne.name/

>


Hope this helps,

-kyle


> --

> ubuntu-server mailing list

> ubuntu-server@lists.ubuntu.com

> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server

> More info: https://wiki.ubuntu.com/ServerTeam



--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 04-08-2012, 02:01 PM
Karl-Arne Gjersøyen
 
Default Permission Denied

I resolve the error when chmod 777 on public_html.
But I have read it has someting to do with the server configuration.
Were can I configure the server to accept file_put_content() when the
directory chmod is 755?

Thanks for your time.

Karl

Den 15:44 8. april 2012 skrev Kyle Johnson <kjohnson@fixertec.net> følgende:
>
> On Apr 8, 2012 9:13 AM, "Karl-Arne Gjersøyen" <karlarneg@gmail.com> wrote:
>>
>> Hello.
>> I am not sure this have to do with my Ubuntu server or it have to do
>> with the PHP installation.
>>
>
> Hello.* Your issue seems to be a file permission problem.
>
>> When using file_put_contents() in PHP I got this error:
>> Warning: file_put_contents(3128a463470a06f833c9787fdf0c58dc .png)
>> [function.file-put-contents]: failed to open stream: Permission denied
>> in /home/test/public_html/cptcha.php on line 62
>>
>> Here is the directory and the permittion on my server:
>>
>> ls -l /
>> drwxr-xr-x * 8 root root *4096 2012-04-08 13:30 home
>>
>> ls -l /home/
>> drwxr-xr-x 4 test * test * 4096 2012-04-08 13:31 test
>>
>> ls -l /home/test/
>> drwxr-xr-x 2 test test 4096 2012-04-08 14:54 public_html
>>
>> karl@ubuntu:~$ ls -l /home/test/public_html/
>> totalt 772
>> -rw-r--r-- 1 test test 778552 2012-04-08 13:58 arial.ttf
>> -rw-r-r-- 1 test test * 1670 2012-04-08 14:54 cptcha.php
>> -rw-r--r-- 1 test test * 1709 2012-04-08 14:43 spamTest.php
>> karl@ubuntu:~$
>>
>
> Webservers, on Ubuntu, usually run as the www-data user.* Either chown this
> directory to www-data, or make the permissions more open by letting "other"
> write:* chmod o+wx .
>
>> Hope you can help me.
>> Thanks for your time!
>>
>> Karl
>> --
>> Hjemmeside: http://www.karl-arne.name/
>> Homepages: http://blog.karl-arne.name/
>>
>
> Hope this helps,
> -kyle
>
>> --
>> ubuntu-server mailing list
>> ubuntu-server@lists.ubuntu.com
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
>> More info: https://wiki.ubuntu.com/ServerTeam

--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 
Old 04-08-2012, 04:17 PM
Cameron Saylor
 
Default Permission Denied

The user that the web server is running as would need to own the files / directories that the web server is writing to. *Look at the first part of Kyle's suggestion.

>> Webservers, on Ubuntu, usually run as the www-data user. *Either chown this

>> directory to www-data, or make the permissions more open by letting "other"
>> write: *chmod o+wx



On Sun, Apr 8, 2012 at 9:01 AM, Karl-Arne Gjersøyen <karlarneg@gmail.com> wrote:

> I resolve the error when chmod 777 on public_html.
> But I have read it has someting to do with the server configuration.
> Were can I configure the server to accept file_put_content() when the
> directory chmod is 755?

>
> Thanks for your time.
>
> Karl
>
> Den 15:44 8. april 2012 skrev Kyle Johnson <kjohnson@fixertec.net> følgende:
>>
>> On Apr 8, 2012 9:13 AM, "Karl-Arne Gjersøyen" <karlarneg@gmail.com> wrote:

>>>
>>> Hello.
>>> I am not sure this have to do with my Ubuntu server or it have to do
>>> with the PHP installation.
>>>
>>
>> Hello.* Your issue seems to be a file permission problem.

>>
>>> When using file_put_contents() in PHP I got this error:
>>> Warning: file_put_contents(3128a463470a06f833c9787fdf0c58dc .png)
>>> [function.file-put-contents]: failed to open stream: Permission denied

>>> in /home/test/public_html/cptcha.php on line 62
>>>
>>> Here is the directory and the permittion on my server:
>>>
>>> ls -l /
>>> drwxr-xr-x * 8 root root *4096 2012-04-08 13:30 home

>>>
>>> ls -l /home/
>>> drwxr-xr-x 4 test * test * 4096 2012-04-08 13:31 test
>>>
>>> ls -l /home/test/
>>> drwxr-xr-x 2 test test 4096 2012-04-08 14:54 public_html

>>>
>>> karl@ubuntu:~$ ls -l /home/test/public_html/
>>> totalt 772
>>> -rw-r--r-- 1 test test 778552 2012-04-08 13:58 arial.ttf
>>> -rw-r-r-- 1 test test * 1670 2012-04-08 14:54 cptcha.php

>>> -rw-r--r-- 1 test test * 1709 2012-04-08 14:43 spamTest.php
>>> karl@ubuntu:~$
>>>
>>
>> Webservers, on Ubuntu, usually run as the www-data user.* Either chown this

>> directory to www-data, or make the permissions more open by letting "other"
>> write:* chmod o+wx .
>>
>>> Hope you can help me.
>>> Thanks for your time!
>>>

>>> Karl
>>> --
>>> Hjemmeside: http://www.karl-arne.name/
>>> Homepages: http://blog.karl-arne.name/

>>>
>>
>> Hope this helps,
>> -kyle
>>
>>> --
>>> ubuntu-server mailing list
>>> ubuntu-server@lists.ubuntu.com

>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
>>> More info: https://wiki.ubuntu.com/ServerTeam

>
> --
> ubuntu-server mailing list
> ubuntu-server@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-server

> More info: https://wiki.ubuntu.com/ServerTeam


--
ubuntu-server mailing list
ubuntu-server@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server
More info: https://wiki.ubuntu.com/ServerTeam
 

Thread Tools




All times are GMT. The time now is 10:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org