niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Solaris
Spontaneously changing file ownerships and permissions
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
Author Message
jwwarrenva@gmail.com
*nix forums beginner


Joined: 21 Jul 2006
Posts: 1

PostPosted: Fri Jul 21, 2006 12:24 am    Post subject: Spontaneously changing file ownerships and permissions Reply with quote

Hi,

At the installation where I work, we have several networked Suns,
mostly running Solaris 9, and Windows PCs. Most of the files are on a
networked file server, serving both Unix and Windows. I am just a user
with good Unix skills, not a sysadmin.

Yesterday afternoon, for no apparent reason, all (or almost all) the
Unix files on the server changed to user=root, group=root,
permissions=777. The data seems unchanged. Files on the workstations'
local drives seem OK. We don't have a clue as to what happended,
although suspicion falls on the file server software-- Data on Tap, I
think it is (not sure about that).

We had a backup a couple of days old, and I was able to write a Perl
script which, when run by root, restored the files' users, groups, and
permissions to those from the backup. Everything looked OK. Then a
few hours later everything changed back to root, root, 777.

It's a pretty secure installation, so hacking seems unlikely, although
I suppose it's possible. We have just reached the end of a contract
and our old sysadmins are leaving at the end of the week. Their
replacements are relatively inexperienced. So far, we don't have a
clue as to what is causing the problem.

Any ideas? Ever seen anything like this?

John Warren
Back to top
Richard B. Gilbert
*nix forums Guru


Joined: 21 Feb 2005
Posts: 456

PostPosted: Fri Jul 21, 2006 12:50 am    Post subject: Re: Spontaneously changing file ownerships and permissions Reply with quote

jwwarrenva@gmail.com wrote:

Quote:
Hi,

At the installation where I work, we have several networked Suns,
mostly running Solaris 9, and Windows PCs. Most of the files are on a
networked file server, serving both Unix and Windows. I am just a user
with good Unix skills, not a sysadmin.

Yesterday afternoon, for no apparent reason, all (or almost all) the
Unix files on the server changed to user=root, group=root,
permissions=777. The data seems unchanged. Files on the workstations'
local drives seem OK. We don't have a clue as to what happended,
although suspicion falls on the file server software-- Data on Tap, I
think it is (not sure about that).

We had a backup a couple of days old, and I was able to write a Perl
script which, when run by root, restored the files' users, groups, and
permissions to those from the backup. Everything looked OK. Then a
few hours later everything changed back to root, root, 777.

It's a pretty secure installation, so hacking seems unlikely, although
I suppose it's possible. We have just reached the end of a contract
and our old sysadmins are leaving at the end of the week. Their
replacements are relatively inexperienced. So far, we don't have a
clue as to what is causing the problem.

Any ideas? Ever seen anything like this?

John Warren


Well hacking seems the likeliest cause of such behavior. Computers
don't just do things like that on their own. Somebody ran a program or
a script that did the dirty deed. It might even have been one or your
soon to be ex sysadmins.
Back to top
CJT
*nix forums Guru Wannabe


Joined: 23 Feb 2005
Posts: 264

PostPosted: Fri Jul 21, 2006 1:22 am    Post subject: Re: Spontaneously changing file ownerships and permissions Reply with quote

Richard B. Gilbert wrote:

Quote:
jwwarrenva@gmail.com wrote:

Hi,

At the installation where I work, we have several networked Suns,
mostly running Solaris 9, and Windows PCs. Most of the files are on a
networked file server, serving both Unix and Windows. I am just a user
with good Unix skills, not a sysadmin.

Yesterday afternoon, for no apparent reason, all (or almost all) the
Unix files on the server changed to user=root, group=root,
permissions=777. The data seems unchanged. Files on the workstations'
local drives seem OK. We don't have a clue as to what happended,
although suspicion falls on the file server software-- Data on Tap, I
think it is (not sure about that).

We had a backup a couple of days old, and I was able to write a Perl
script which, when run by root, restored the files' users, groups, and
permissions to those from the backup. Everything looked OK. Then a
few hours later everything changed back to root, root, 777.

It's a pretty secure installation, so hacking seems unlikely, although
I suppose it's possible. We have just reached the end of a contract
and our old sysadmins are leaving at the end of the week. Their
replacements are relatively inexperienced. So far, we don't have a
clue as to what is causing the problem.

Any ideas? Ever seen anything like this?

John Warren


Well hacking seems the likeliest cause of such behavior. Computers
don't just do things like that on their own. Somebody ran a program or
a script that did the dirty deed. It might even have been one or your
soon to be ex sysadmins.

.... and it might be in a chron job, so don't be surprised to see it
happen again.

--
The e-mail address in our reply-to line is reversed in an attempt to
minimize spam. Our true address is of the form che...@prodigy.net.
Back to top
victorfeng1973@yahoo.com
*nix forums beginner


Joined: 26 Oct 2005
Posts: 33

PostPosted: Fri Jul 21, 2006 1:27 am    Post subject: Re: Spontaneously changing file ownerships and permissions Reply with quote

If the hack is from internal, based on what you just described, you can
check on the cron job for root. If there is nothing from root, check
on rest of other users because they can do sudo. Anyway, you can even
disable everybody's cronjob to see what happens.

After you are done with cronjob, you can just disconnect the box from
the world to narrow down the source of problem.

Regards
Victor
Back to top
victorfeng1973@yahoo.com
*nix forums beginner


Joined: 26 Oct 2005
Posts: 33

PostPosted: Fri Jul 21, 2006 1:35 am    Post subject: Re: Spontaneously changing file ownerships and permissions Reply with quote

You may use "/etc/init.d/cron stop" to stop cronjob.

Victor
Back to top
Gary
*nix forums addict


Joined: 17 May 2005
Posts: 58

PostPosted: Fri Jul 21, 2006 10:16 am    Post subject: Re: Spontaneously changing file ownerships and permissions Reply with quote

jwwarrenva@gmail.com wrote:
Quote:
Hi,

At the installation where I work, we have several networked Suns,
mostly running Solaris 9, and Windows PCs. Most of the files are on a
networked file server, serving both Unix and Windows. I am just a user
with good Unix skills, not a sysadmin.

Yesterday afternoon, for no apparent reason, all (or almost all) the
Unix files on the server changed to user=root, group=root,
permissions=777. The data seems unchanged. Files on the workstations'
local drives seem OK. We don't have a clue as to what happended,
although suspicion falls on the file server software-- Data on Tap, I
think it is (not sure about that).

We had a backup a couple of days old, and I was able to write a Perl
script which, when run by root, restored the files' users, groups, and
permissions to those from the backup. Everything looked OK. Then a
few hours later everything changed back to root, root, 777.

It's a pretty secure installation, so hacking seems unlikely, although
I suppose it's possible. We have just reached the end of a contract
and our old sysadmins are leaving at the end of the week. Their
replacements are relatively inexperienced. So far, we don't have a
clue as to what is causing the problem.

Any ideas? Ever seen anything like this?

John Warren

I had a problem like this on one of our webservers when I took a weeks

holiday.
The other admin spent 3 days rebuilding the firewalls etc etc etc.
Luckily (for once) this WAS a production server so he couldn't afford to
take it offline and rebuild.
It turns out we had a cron script running every hour that changed
ownership of one htdocs directory. We had lost the contract for that
website so the other admin simply deleted the directory but NOT the cron
job.
Cron not being able to figure this all out simply ran out of the root
directory all the way through every filesystem.
Needless to say I had loads of fun after figuring this out resetting
everything.
At least we had better firewalls after that Smile
HTH
Jim
Back to top
Casper H.S. Dik
*nix forums Guru


Joined: 20 Feb 2005
Posts: 1634

PostPosted: Fri Jul 21, 2006 12:37 pm    Post subject: Re: Spontaneously changing file ownerships and permissions Reply with quote

"jwwarrenva@gmail.com" <jwwarrenva@gmail.com> writes:

Quote:
Yesterday afternoon, for no apparent reason, all (or almost all) the
Unix files on the server changed to user=root, group=root,
permissions=777. The data seems unchanged. Files on the workstations'
local drives seem OK. We don't have a clue as to what happended,
although suspicion falls on the file server software-- Data on Tap, I
think it is (not sure about that).

We had a backup a couple of days old, and I was able to write a Perl
script which, when run by root, restored the files' users, groups, and
permissions to those from the backup. Everything looked OK. Then a
few hours later everything changed back to root, root, 777.

It's a pretty secure installation, so hacking seems unlikely, although
I suppose it's possible. We have just reached the end of a contract
and our old sysadmins are leaving at the end of the week. Their
replacements are relatively inexperienced. So far, we don't have a
clue as to what is causing the problem.

Any ideas? Ever seen anything like this?

No; looks like a script running AMOK (wrong directory).

Most likely it would be using the chmod/chown programs or possibly
find.

Dtrace would have been easy but tha requires Solaris 9.

Check the ctime (ls -lc) of the files and then try to correlate
this with cronjos.

Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
Back to top
Oscar del Rio
*nix forums Guru


Joined: 24 Feb 2005
Posts: 385

PostPosted: Fri Jul 21, 2006 2:01 pm    Post subject: Re: Spontaneously changing file ownerships and permissions Reply with quote

Casper H.S. Dik wrote:
Quote:
"jwwarrenva@gmail.com" <jwwarrenva@gmail.com> writes:

Yesterday afternoon, for no apparent reason, all (or almost all) the
Unix files on the server changed to user=root, group=root,
permissions=777. The data seems unchanged. Files on the workstations'

No; looks like a script running AMOK (wrong directory).

This came up in another thread some time ago...
IMHO, it is a "good thing" that /bin/sh quits if a script
tries to cd to a non-existent directory.

bash and ksh print an error (probably discarded in cron jobs)
but continue running the script probably in the wrong directory,
unless the code actually checks the pwd before proceeding.
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [8 Posts] View previous topic :: View next topic
The time now is Sat Nov 22, 2008 8:48 pm | All times are GMT
navigation Forum index » *nix » Solaris
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Changing postfix's 600 chmod wdave Postfix 1 Mon Apr 14, 2008 1:23 am
No new posts Running php file everyday on scheduled time sachin PHP 1 Fri Jul 21, 2006 12:49 pm
No new posts Regarding thesaurus iso file Srikanth modules 0 Fri Jul 21, 2006 10:42 am
No new posts changing port in vsftp henk@oegema.com Suse 2 Fri Jul 21, 2006 10:42 am
No new posts how can i get a file descriptor not used? mars system 0 Fri Jul 21, 2006 7:41 am

Credit Counseling | Project cars for sale | Mortgage Calculator | Loans | Personal Car Finance
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3549s ][ Queries: 16 (0.2330s) ][ GZIP on - Debug on ]