LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   security (https://www.linuxquestions.org/questions/linux-newbie-8/security-735749/)

l.man 06-26-2009 02:57 AM

security
 
hi,

i'm just starting to find my way around my Debian machine,i.e configuring and running my web server(apache+php+mysql).

i have this security issue: for now(logged as a normal user not root), i can only edit and save my files as a root user using vi in the terminal.

how can i be able to create files logged as a normal user even if i have to provide the root password first.

jdkaye 06-26-2009 03:23 AM

Quote:

Originally Posted by l.man (Post 3586808)
hi,

i'm just starting to find my way around my Debian machine,i.e configuring and running my web server(apache+php+mysql).

i have this security issue: for now(logged as a normal user not root), i can only edit and save my files as a root user using vi in the terminal.

how can i be able to create files logged as a normal user even if i have to provide the root password first.

This depends on what folder you're saving them in. For example, you should be able to create and save files anywhere in your home folder. Anywhere else (except perhaps other users' home folders) requires root privileges, but it is always possible to create a subdirectory that does not require such privileges. Just be sure you know what you're doing.
cheers,
jdk

l.man 07-21-2009 03:23 AM

Quote:

Originally Posted by jdkaye (Post 3586829)
This depends on what folder you're saving them in. For example, you should be able to create and save files anywhere in your home folder. Anywhere else (except perhaps other users' home folders) requires root privileges, but it is always possible to create a subdirectory that does not require such privileges. Just be sure you know what you're doing.
cheers,
jdk

which means i have to always log as root to create a file in, for example, /var/www?

linuxlover.chaitanya 07-21-2009 04:34 AM

If you want you can change the permissions of the directory to allow your user to edit the files there.

l.man 07-21-2009 04:44 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3614908)
If you want you can change the permissions of the directory to allow your user to edit the files there.

let me try it.

out of interest question;

i'm having problem with this apt-get update command( on Debian):

it couldn't run but give out this error message:

W: Failed to fetch http://volatile.debian.org/debian-volat ... ce/Sources Cannot initiate the connection to volatile.debian.org:80 (2001:610:1908:a000::149:227). - connect (101 Network is unreachable) [IP: 2001:610:1908:a000::149:227 80]


any help?

linuxlover.chaitanya 07-21-2009 06:18 AM

You should not have hijacked unrelated thread for your issue though you are the OP of this thread. It helps mods to keep forum clean if threads are kept at one place and all the posts are related.
Anyhow, are you connected to internet? And are you running it as sudo?

unSpawn 07-21-2009 07:02 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3615027)
You should not have hijacked unrelated thread for your issue though you are the OP of this thread.

As far as I know hijacking involves other LQ members than the OP drawing away attention from the original post.
Any original poster should be able to ask additional questions in her or his thread without being accused of "hijacking".
It just is up to us if we want to answer them or point to the practice of creating a new thread for unrelated issues.

jdkaye 07-21-2009 09:23 AM

Quote:

Originally Posted by l.man (Post 3614921)
let me try it.

out of interest question;

i'm having problem with this apt-get update command( on Debian):

it couldn't run but give out this error message:

W: Failed to fetch http://volatile.debian.org/debian-volat ... ce/Sources Cannot initiate the connection to volatile.debian.org:80 (2001:610:1908:a000::149:227). - connect (101 Network is unreachable) [IP: 2001:610:1908:a000::149:227 80]


any help?

That is not an error; it's a warning. It's unhappy with one of your repos in the /etc/apt/sources.list file. Either that server is down temporarily, or you were not connected to the network when you ran apt-get command, or the line referring to it is ill formed in some way. You can try a server from another mirror.

If you're still not sure, then post the contents of your sources.list file.
cheers,
jdk

l.man 07-22-2009 01:43 AM

Quote:

Originally Posted by jdkaye (Post 3615241)
That is not an error; it's a warning. It's unhappy with one of your repos in the /etc/apt/sources.list file. Either that server is down temporarily, or you were not connected to the network when you ran apt-get command, or the line referring to it is ill formed in some way. You can try a server from another mirror.

If you're still not sure, then post the contents of your sources.list file.
cheers,
jdk

here are the contents of sources.list
Code:

#
# deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-1 20090413-00:33]/ lenny contrib main

deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-1 20090413-00:33]/ lenny contrib main

deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-2 20090413-00:33]/ lenny contrib main

deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-3 20090413-00:33]/ lenny contrib main

deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-4 20090413-00:33]/ lenny contrib main

deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-5 20090413-00:33]/ lenny contrib main

deb cdrom:[Debian GNU/Linux 5.0.1 Update DVD 20090414: i386 DVD 1]/ lenny contrib main non-free

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

# Line commented out by installer because it failed to verify:
#deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
# Line commented out by installer because it failed to verify:
#deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free


jdkaye 07-22-2009 02:14 AM

This is your problem. All your repos are on the original CD. You need to change that. A typical lenny sources.list file might look like this:
Code:

deb http://ftp.us.debian.org/debian/ lenny main
deb-src http://ftp.us.debian.org/debian/ lenny main

deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib

deb http://ftp.us.debian.org/debian/ lenny non-free
deb http://ftp.us.debian.org/debian/ lenny contrib
deb http://www.debian-multimedia.org/ lenny main
deb-src http://debian-multimedia.org/ lenny main

You can switch to another mirror if you like but that should sort out most of your apt-get (or better, aptitude) problems.
Cheers,
jdk

l.man 07-23-2009 08:32 AM

i've modified the sources.list to this, but still there is no success:
Code:

#
# deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-1 20090413-00:33]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-1 20090413-00:33]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-2 20090413-00:33]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-3 20090413-00:33]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-4 20090413-00:33]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.1 _Lenny_ - Official i386 DVD Binary-5 20090413-00:33]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.1 Update DVD 20090414: i386 DVD 1]/ lenny contrib main non-free

deb http://ftp.us.debian.org/debian/ lenny main
deb-src http://ftp.us.debian.org/debian/ lenny main

deb http://security.debian.org/ lenny/updates main contrib
deb-src http://security.debian.org/ lenny/updates main contrib

deb http://ftp.us.debian.org/debian/ lenny non-free
deb http://ftp.us.debian.org/debian/ lenny contrib
deb http://www.debian-multimedia.org/ lenny main
deb-src http://debian-multimedia.org/ lenny main


this is what i get:
Code:

nul-mokoena:~# apt-get update
Err http://www.debian-multimedia.org lenny Release.gpg
  Could not connect to www.debian-multimedia.org:80 (91.121.86.213). - connect (111 Connection refused)
Err http://www.debian-multimedia.org lenny/main Translation-en_ZA             
  Could not connect to www.debian-multimedia.org:80 (91.121.86.213). - connect (111 Connection refused)
Err http://debian-multimedia.org lenny Release.gpg                           
  Could not connect to debian-multimedia.org:80 (91.121.86.213). - connect (111 Connection refused)
Err http://security.debian.org lenny/updates Release.gpg                     
  Could not connect to security.debian.org:80 (212.211.132.32). - connect (111 Connection refused)
Err http://ftp.us.debian.org lenny Release.gpg                               
  Could not connect to ftp.us.debian.org:80 (64.50.236.52). - connect (111 Connection refused)
Err http://ftp.us.debian.org lenny/main Translation-en_ZA
  Could not connect to ftp.us.debian.org:80 (64.50.236.52). - connect (111 Connection refused)
Err http://security.debian.org lenny/updates/main Translation-en_ZA           
  Could not connect to security.debian.org:80 (212.211.132.32). - connect (111 Connection refused)
Err http://ftp.us.debian.org lenny/non-free Translation-en_ZA                 
  Could not connect to ftp.us.debian.org:80 (64.50.236.52). - connect (111 Connection refused)
Err http://ftp.us.debian.org lenny/contrib Translation-en_ZA                 
  Could not connect to ftp.us.debian.org:80 (64.50.236.52). - connect (111 Connection refused)
Err http://security.debian.org lenny/updates/contrib Translation-en_ZA       
  Could not connect to security.debian.org:80 (212.211.132.32). - connect (111 Connection refused)
Reading package lists... Done                         
W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/Release.gpg  Could not connect to ftp.us.debian.org:80 (64.50.236.52). - connect (111 Connection refused)

W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/main/i18n/Translation-en_ZA.bz2  Could not connect to ftp.us.debian.org:80 (64.50.236.52). - connect (111 Connection refused)

W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/non-free/i18n/Translation-en_ZA.bz2  Could not connect to ftp.us.debian.org:80 (64.50.236.52). - connect (111 Connection refused)

W: Failed to fetch http://ftp.us.debian.org/debian/dists/lenny/contrib/i18n/Translation-en_ZA.bz2  Could not connect to ftp.us.debian.org:80 (64.50.236.52). - connect (111 Connection refused)

W: Failed to fetch http://security.debian.org/dists/lenny/updates/Release.gpg  Could not connect to security.debian.org:80 (212.211.132.32). - connect (111 Connection refused)

W: Failed to fetch http://security.debian.org/dists/lenny/updates/main/i18n/Translation-en_ZA.bz2  Could not connect to security.debian.org:80 (212.211.132.32). - connect (111 Connection refused)

W: Failed to fetch http://security.debian.org/dists/lenny/updates/contrib/i18n/Translation-en_ZA.bz2  Could not connect to security.debian.org:80 (212.211.132.32). - connect (111 Connection refused)

W: Failed to fetch http://www.debian-multimedia.org/dists/lenny/Release.gpg  Could not connect to www.debian-multimedia.org:80 (91.121.86.213). - connect (111 Connection refused)

W: Failed to fetch http://www.debian-multimedia.org/dists/lenny/main/i18n/Translation-en_ZA.bz2  Could not connect to www.debian-multimedia.org:80 (91.121.86.213). - connect (111 Connection refused)

W: Failed to fetch http://debian-multimedia.org/dists/lenny/Release.gpg  Could not connect to debian-multimedia.org:80 (91.121.86.213). - connect (111 Connection refused)

W: Some index files failed to download, they have been ignored, or old ones used instead.
W: You may want to run apt-get update to correct these problems
nul-mokoena:~#


jdkaye 07-23-2009 09:04 AM

You do have a working internet connection, yes?
jdk

l.man 07-23-2009 09:17 AM

Quote:

Originally Posted by jdkaye (Post 3617726)
You do have a working internet connection, yes?
jdk

probably yes, i'm using the same machine to post in the forum.

Tinkster 07-23-2009 12:06 PM

Are you behind a firewall/proxy?


All times are GMT -5. The time now is 07:32 AM.