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 06-26-2009, 03:57 AM   #1
l.man
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Rep: Reputation: 0
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.
 
Old 06-26-2009, 04:23 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by l.man View Post
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
 
Old 07-21-2009, 04:23 AM   #3
l.man
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jdkaye View Post
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?
 
Old 07-21-2009, 05:34 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
If you want you can change the permissions of the directory to allow your user to edit the files there.
 
Old 07-21-2009, 05:44 AM   #5
l.man
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by linuxlover.chaitanya View Post
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?
 
Old 07-21-2009, 07:18 AM   #6
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,629

Rep: Reputation: Disabled
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?
 
Old 07-21-2009, 08:02 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531Reputation: 3531
Quote:
Originally Posted by linuxlover.chaitanya View Post
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.
 
Old 07-21-2009, 10:23 AM   #8
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by l.man View Post
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

Last edited by jdkaye; 07-21-2009 at 10:25 AM.
 
Old 07-22-2009, 02:43 AM   #9
l.man
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jdkaye View Post
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
 
Old 07-22-2009, 03:14 AM   #10
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
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
 
Old 07-23-2009, 09:32 AM   #11
l.man
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
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:~#
 
Old 07-23-2009, 10:04 AM   #12
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
You do have a working internet connection, yes?
jdk
 
Old 07-23-2009, 10:17 AM   #13
l.man
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jdkaye View Post
You do have a working internet connection, yes?
jdk
probably yes, i'm using the same machine to post in the forum.
 
Old 07-23-2009, 01:06 PM   #14
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Are you behind a firewall/proxy?
 
  


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
[Security Questions] Last Login, how good is this feature for security breach info? t3gah Linux - Security 2 06-14-2005 02:02 AM


All times are GMT -5. The time now is 03:56 PM.

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