LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-17-2005, 12:09 PM   #1
mfrangos79
Member
 
Registered: Jun 2005
Posts: 53

Rep: Reputation: 15
Exclamation PANIC!..permissions changed ... hard drive problem


I wanted to protect my data from others... so i opened a konsole as 'su' and i went in the root directory. There.. I typed ' chmod -R go-wxr /*' . (so that group and others cannot read write or execute).. Then I closed the Konsole and i could not enter any folder ... even on the desktop. So i restarted ... I could not log in as a user...so i logged in as root.

I went back in konsole and did the following ..in the root directory:
'chmod -R a+wrx /* ' and now everything is OK.

However I guess my data are exposed to everyone now...So what do i have to do to protect my data from others??
(I am using suse 9.3 ... The PC i am using is my personal one (I am the root)..but i am connected on a students network server..)

Thx in advance

Last edited by mfrangos79; 07-17-2005 at 09:53 PM.
 
Old 07-17-2005, 01:08 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Being on the network, you might consider reinstalling just in case someone might of replaced a system command with one of their own. ( Enabling the 'o' "other" for write was a big mistake. )

Most configuration files in /etc for example are readable by anyone who needs them, but some aren't. Files that deal with authentication such as passwords for samba shares or the secure shell private key are not world readable.

If you are concerned about your data, you could check the permissions of your home directory. You might consider creating a group name that is the same as your user name. Then you can use the 'find' command inside to locate all files and directories owned by 'users' in your user directory ( /home/username ) and change it to your new group. This way if a program saves a file with group readable permissions, only you will be able to read it. This is how Mandrake sets up new users. SuSE creates new users differently. You can make the changes after adding the new group in YaST.

Another option is to change the umask value inside of ~/.profile. If you mask out group permissions for newly created files, someone else in the 'user' group won't be able to read your files.

Also make sure that you aren't running unnecessary services such as telnet that you don''t need. As well, check your firewall settings to make it more difficult for an unauthorized user to connect to your computer.

Don't make global permission changes or ownership or group changes though out your system ( i.e. on the root directory). Many files are owned by system users with special permissions to enable the system to run securely.
 
Old 07-17-2005, 09:43 PM   #3
mfrangos79
Member
 
Registered: Jun 2005
Posts: 53

Original Poster
Rep: Reputation: 15
Exclamation PANIC

OK.. I did as you said.
I reinstalled..
After that .. I created a group 'Mygroup'
and I created 2 accounts .... 'mine' and 'guest'

I have this problem though that i never had before ..(after installing Linux)
... I have an 80G 2nd hard disc for movies and pictures... I am sure I did not format it during reinstallation.
I cannot see any file in it ... and when I go from konqueror to /media... when i try to click on the icon of this hard disk it says the following :

'' Could not mount device.
The reported error was:
mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so''

I think it has to do something with permission ... but the strange thing is that i cannot see anything inside it from konsole even as a root...

If it helps this is what it says in fstab :
/dev/hdb1 /windows/C vfat users,gid=users,umask=0002,utf8=true 0 0

Again I am 100% sure that i did not format it ..and that probably everything got messed up after changing the groups.. !

help!
Thanks in advance!
 
Old 07-18-2005, 07:16 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Permissions settings on the second drive would effect whether or not you can access it but shouldn't prevent the mounting of the drive at boot. The message you are getting is a catch all message. Usually, a bad option or file system type was included in the fstab entry. Are you sure that the windows partition uses FAT32? For XP, the NTFS file system is the default. Normally an NTFS mount will be read-only in linux.

The "utf8=true" doesn't look right.
Try something like:
Code:
/dev/hdb1 /media/windows/C vfat codepage=850,iocharset=iso8859-1,utf8,gid=users,umask=0002
 
Old 07-20-2005, 08:58 PM   #5
mfrangos79
Member
 
Registered: Jun 2005
Posts: 53

Original Poster
Rep: Reputation: 15
Ok .... i solved my problems with the original old fasioned way...
I formated and reinstalled Linux ..now everything works fine ... + I installed windows as well ...
I think a cobination of the 2 is a good choice ..What I cannot do easily with one I can do it with the other...
Thx anyway
 
  


Reply



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
messed up permissions Smokey Slackware 5 10-29-2004 12:17 PM
I messed up my / permissions np complete Linux - General 4 10-29-2004 08:17 AM
su permissions messed up ceph Linux - General 1 09-08-2004 11:54 PM
Messed up my permissions usercsr Slackware 7 07-08-2004 11:21 AM
I think I messed up my permissions... jeffreybluml Linux - Newbie 4 03-25-2004 06:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:55 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
Open Source Consulting | Domain Registration