LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-17-2004, 09:17 PM   #1
Charlie Chan
LQ Newbie
 
Registered: May 2004
Location: Byan, Texas USA
Distribution: Fedora 1 and it updates
Posts: 20

Rep: Reputation: 0
Question How do you change a files permissions


I have never been able to change any of the file permissions on this system. I know this is a security issue. So that is why I am asking the question in this forum. I have followed what few instructions I have been given, but nothing works. Here is how I did the last attempt:
[root@localhost root]# /etc/sane.d/epkowa.conf -rw-rw-rw
The response was access denied. If I can not gain access to the file permissions, I can not make any changes that need to be done. I hope to get the necessary help or I am through with Linux. It appears to be more trouble that it is worth! At this point, I already have a worthless $50 book 'Red Hat Linux 9 UNLEASHED', and I do not have the money for another expensive book or the room for any either. Will some one please help me get this file permission issue resolved.

Last edited by Charlie Chan; 10-17-2004 at 09:18 PM.
 
Old 10-17-2004, 09:37 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
See if this helps > http://www.linuxquestions.org/questi...ticle&artid=20
 
Old 10-17-2004, 09:40 PM   #3
celejar
Member
 
Registered: Oct 2003
Location: New York
Distribution: Debian Sid
Posts: 185

Rep: Reputation: 30
'chmod 666 FILENAME' ('man chmod' or 'info chmod' for explanation of the chmod command).
 
Old 10-17-2004, 11:30 PM   #4
Charlie Chan
LQ Newbie
 
Registered: May 2004
Location: Byan, Texas USA
Distribution: Fedora 1 and it updates
Posts: 20

Original Poster
Rep: Reputation: 0
Unhappy

I can change the permissions of a file in appearance but not in function when I use:

$ chmod 666 /home/charlie/Documents/Linux\ Terminal\ Switches
$ ls -l /home/charlie/Documents/Linux\ Terminal\ Switches
-rw-rw-rw- 1 charlie charlie 2631 Oct 16 12:34 /home/charlieDocuments/Linux Terminal Switches

I still can not write in the file after changing the permissions. The problem exists with text files (Text Editor, .conf files). I can create a text file using Text Editor, but after closing and reopening, it can not be altered. I have no problem with any Open Office file I create.

This is one of the files I need to change but can not do so:
$ chmod 666 /proc/self/root/etc/sane.d/epkowa.conf
chmod: changing permissions of `/proc/self/root/etc/sane.d/epkowa.conf': Operation not permitted


Does any one have any idea of what is going wrong?

Last edited by Charlie Chan; 10-17-2004 at 11:36 PM.
 
Old 10-17-2004, 11:44 PM   #5
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
Dude, in your line above
Code:
[root@localhost root]# /etc/sane.d/epkowa.conf -rw-rw-rw
your not trying to edit it, your trying to run it as an executable! You have to open it in a text editor. For instance,

pico /etc/sane.d/epkowa.conf

For other files that you create in your home directory, what is the output of umask and explain the exact steps you are performing to open, edit and save files.
 
Old 10-18-2004, 12:56 AM   #6
Charlie Chan
LQ Newbie
 
Registered: May 2004
Location: Byan, Texas USA
Distribution: Fedora 1 and it updates
Posts: 20

Original Poster
Rep: Reputation: 0
I got read and write permission using:
su
password
chmod 666 /path/epkowa.conf

I also finally got write permission to /etc/yum.conf by doing the same thing.

However, I am still working on the Epson Perfection 3170 Photo scanner not being detected. Now that I can change permission, I hope to be able to get the scanner to be detected by Gimp and Iscan., one-of-these-days.
 
Old 10-18-2004, 01:46 AM   #7
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
It's not good security practice to give users write permissions over system config files. You should su and then do any changing you need to do to a file.
 
Old 10-20-2004, 08:43 PM   #8
Charlie Chan
LQ Newbie
 
Registered: May 2004
Location: Byan, Texas USA
Distribution: Fedora 1 and it updates
Posts: 20

Original Poster
Rep: Reputation: 0
This is a single user home machine. So far, it has been used for learning purposes only. My only concern about permissions is in the areas of e-mail virus activity and browser security holes.
 
Old 10-20-2004, 10:19 PM   #9
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480° N, 95.3690° W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
That is the least of your worries. If you go about giving everyone permissions to files that only root should have permission, you give every hacker an open invitation you exploit your system. You su to root to chmod the file. What you should be doing is su to root long enough to work on the file.

If you are worried about viruses. On Linux they are not a big problem because when a user opens a virus email it can't get access to system files. Your chmod'ing is giving user permissions to system files. So you are actually opening up the security holes for viruses and browser exploits.
 
  


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
Change permissions 4 many files at 1ce? TruthSeeker Linux - Newbie 3 10-31-2005 08:23 AM
How to change permissions? SonoranFun Linux - Newbie 4 11-02-2004 10:10 AM
recursive file permissions does not change new files in same directory PAB Linux - Newbie 2 03-08-2004 12:27 PM
How do I change permissions of files/directories? Okashira Linux - Newbie 5 01-12-2004 05:11 PM
How Can I Change Permissions monkeymartin Linux - General 1 03-25-2003 12:47 PM

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

All times are GMT -5. The time now is 09:58 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