LinuxQuestions.org
Help answer threads with 0 replies.
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 11-01-2010, 03:57 AM   #1
Traci
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Rep: Reputation: 0
Ubuntu user security


Hi All
I have been working with Ubuntu server for a little while (on a basic level - i.e. I am still very much a newbie), but would like to improve the security on my server. I have googled quite a bit, but am so confused by all out there, that I thought I would see if I can get a concise answer out of this forum (My first post, so let's hope I introduce myself without blowing anything!).
What prompted this:
I installed postgresql 8.4 (I am on Ubuntu Server 9.10) using apt-get. Postgresql is working, and I can connect remotely using PGAdmin III.
However, I have a java app that runs on the server, and when I try and start it now, using ./start-app.sh, I get: "bash: ./start-app.sh: Permission denied".
This has never happened before, so I figured it is something to do with the Postgresql install (it creates a user on the server, and since this is the only change I thought it might be that process).
In my googling, I have also come across the /var/log/auth,log file, and I see people are trying to hack the server.

This has prompted me to want to know what is wrong, and how to fix it.
Simple question, not such a simple answer I know, but if anyone out there would like to help me in more of a step by step process, I would be eternally grateful.

As I said, I am actively looking, but would love some help!

Many thanks and kind regards
 
Old 11-01-2010, 04:49 AM   #2
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
What user were you logged in as when you tried to run the script?

Post the output of:

Code:
ls -la start-app.sh
I doubt your postgres install would break a script that initiates a Java application.
 
Old 11-01-2010, 10:52 AM   #3
Traci
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Hi!

I do sudo bash to run the script / start the app.

output of your command:
-rw-r--r-- 1 root root 37 2010-04-21 17:19 ./start-app.sh

I also doubt that would happen, but I can't think of anything else I have done that would change this behaviour?

Thanks
Traci

ps Apologies for the late response, I thought I would be notified via email! Will keep updatng the post in future.

Last edited by Traci; 11-01-2010 at 10:53 AM.
 
Old 11-01-2010, 11:12 AM   #4
Traci
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
I am having fun here! Just lost my reply.
Anyway, I was logged in as root (via sudo) when trying to execute the ./start-app.sh.
the output of your code: -rw-r--r-- 1 root root 37 2010-04-21 17:19 ./start-app.sh

You got me thinking though, and I had not added 'x' permission to the actual .sh file before, so never thought to add it now.
I added it, and now it runs.
Weird, because it used to run before without that, so something did happen to the security I'm sure, I'll still try and figure out why, but at least the app is working!

If you do have a comment about the output, I would love to hear it.

I'll close the thread though, thanks again.
Much appreciated
Traci
 
Old 11-02-2010, 02:23 AM   #5
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
I suspect your script was either recreated or renamed (via mv) - and thus default permissions were set on the script (rw-r--r--). By default any new file created doesn't have execute permissions unless you explicitly set the execute permission.
 
Old 11-02-2010, 05:22 AM   #6
Traci
LQ Newbie
 
Registered: Sep 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Except it was installed prior to this 'issue of mine', and executing.
Just stopped after PG install, although I subsequently thought I also did apt-get update and apt-get upgrade before installing PG.
Not sure if any of those security updates would have done anything.. don't imagine so.
Learning curve!
 
  


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
LXer: Buck-security - Security scanner for Ubuntu Servers LXer Syndicated Linux News 0 03-31-2010 09:10 PM
samba(global security=user) useful tools for client.ex: user change password. hocheetiong Linux - Newbie 1 03-18-2008 10:20 AM
User Security dragoroberto Linux - Security 2 03-18-2005 01:30 PM
samba with security = user davidsrsb Slackware 5 09-10-2004 10:44 AM


All times are GMT -5. The time now is 08:44 AM.

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