LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-22-2007, 05:18 PM   #1
Aerolinux
LQ Newbie
 
Registered: Feb 2007
Posts: 22

Rep: Reputation: 15
how to change the permissions for files ?


I am trying to edit some files in the tmp/XXX/YYY directory.
But there are many files and filders within them and are protected. How can I change the permissions for all the files in the main /tmp/XXX/YYY directory and the files that are contained in the folder within this directory.

I tried using chmod a+rw (foldername)

the folder's permissions are changed but the files within are still protected. How can I change them at once ? There are too many files for me to use this command for every file...

CAn anyone help me ?? Thank you sooooooo much in advance...
 
Old 02-22-2007, 05:31 PM   #2
dxqcanada
Member
 
Registered: Sep 2006
Location: Canada
Distribution: Gentoo
Posts: 702

Rep: Reputation: 43
Check the manpage for chmod:

-R Recursively change permissions of directories and their contents.
 
Old 02-22-2007, 05:32 PM   #3
PeteAppleton
LQ Newbie
 
Registered: Aug 2006
Location: Yorkshire
Distribution: gentoo
Posts: 11

Rep: Reputation: 0
chmod a+rw /tmp/XXX/YYY/*

# Note the * at the end

If you specify the directory name, it'll change the permissions on the directory (as you requested). You mean to change the files, so put the /* to specify "all files in this directory".

Why do you need to change the permissions on many temp files though? Just curious...
 
Old 02-23-2007, 09:25 AM   #4
Aerolinux
LQ Newbie
 
Registered: Feb 2007
Posts: 22

Original Poster
Rep: Reputation: 15
Thanks... that worked...

I am trying to edit some files in the sub directory to install a NIC... but everytime ther permissions are changed... cant figure out why...
 
Old 02-23-2007, 09:12 PM   #5
PeteAppleton
LQ Newbie
 
Registered: Aug 2006
Location: Yorkshire
Distribution: gentoo
Posts: 11

Rep: Reputation: 0
I'm treading very lightly here, because I don't know very much myself and could easily be wrong; however, my understanding is that the /tmp hierarchy is used by the system in response to the configuration, and is cleared at each reboot. This is why the permissions get reset "everytime" - by everytime, I'm assuming that you mean "each reboot"? Normally, again according to my limited knowledge, most systems clear /tmp at reboot and then populate it based upon the system behaviour. Therefore, the solution is not to modify the temp files but to correct the configuration that gives rise to the temp files (ie, deal with the root cause).

You haven't said which NIC, or why you need to edit the files - this could help find the "right" resolution to your problem. I don't *know* that your solution is wrong (it could easily be far in advance of what I know); it just kinda "feels" wrong, but no concrete evidence at all.
 
  


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 File permissions on numerous files ryanzietlow Linux - General 9 11-03-2006 04:43 PM
Cant change permissions of files on a mounted fat16 attockonian Slackware 6 08-01-2006 12:52 PM
Change permissions 4 many files at 1ce? TruthSeeker Linux - Newbie 3 10-31-2005 08:23 AM
How do you change a files permissions Charlie Chan Linux - Security 8 10-20-2004 10:19 PM
How do I change permissions of files/directories? Okashira Linux - Newbie 5 01-12-2004 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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