How to CHMOD files or folders only?

Discussion regarding Joomla! security issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Security Checklist
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
silentz
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Fri Sep 30, 2005 1:40 am
Location: Canukland
Contact:

How to CHMOD files or folders only?

Post by silentz » Fri Jan 20, 2006 3:03 am

Hi there,

I know that Joomla has a tool to change all files or all folders to a particular CHMOD setting but as I can't get into Joomla yet (because of permissions) I'm wondering who knows the command to CHMOD all folders (but not files) in a directory, or vice versa.

Thanks!
Howdy!

ezsearch
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Fri Aug 19, 2005 10:30 pm

Re: How to CHMOD files or folders only?

Post by ezsearch » Fri Jan 20, 2006 3:51 am

similiar to my recommedation to another person, you can use winscp to righ click on file and/or folder and change the permission.

User avatar
tonyskyday
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 144
Joined: Wed Aug 17, 2005 11:17 pm

Re: How to CHMOD files or folders only?

Post by tonyskyday » Fri Jan 20, 2006 4:27 am

Do you have shell access (SSH)?

User avatar
Chris
Joomla! Guru
Joomla! Guru
Posts: 812
Joined: Sat Aug 20, 2005 3:58 am
Location: Australia
Contact:

Re: How to CHMOD files or folders only?

Post by Chris » Fri Jan 20, 2006 5:01 am

silentz wrote: Hi there,

I know that Joomla has a tool to change all files or all folders to a particular CHMOD setting but as I can't get into Joomla yet (because of permissions) I'm wondering who knows the command to CHMOD all folders (but not files) in a directory, or vice versa.

Thanks!

Where is the site?
Wihat server type etv?
There is no failure until you give up.

Chris

User avatar
silentz
Joomla! Intern
Joomla! Intern
Posts: 86
Joined: Fri Sep 30, 2005 1:40 am
Location: Canukland
Contact:

Re: How to CHMOD files or folders only?

Post by silentz » Fri Jan 20, 2006 6:05 am

Yes I have SSH and know how to change permissions in general, just not how to limit it to files / folders only. Oh, and it's a linux/apache setup.
Howdy!

User avatar
tonyskyday
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 144
Joined: Wed Aug 17, 2005 11:17 pm

Re: How to CHMOD files or folders only?

Post by tonyskyday » Fri Jan 20, 2006 6:06 am

silentz wrote: Yes I have SSH and know how to change permissions in general, just not how to limit it to files / folders only.
http://en.wikipedia.org/wiki/Chmod
Last edited by tonyskyday on Fri Jan 20, 2006 6:07 am, edited 1 time in total.

User avatar
jenscski
Joomla! Ace
Joomla! Ace
Posts: 1468
Joined: Thu Aug 18, 2005 6:58 am
Location: Tønsberg, Norway

Re: How to CHMOD files or folders only?

Post by jenscski » Fri Jan 20, 2006 7:13 am

To chmod all files in the current folder:
find -maxdepth 1 -type f -exec chmod 644 {} \;

To chmod all directories in current folde:
find -maxdepth 1 -type d -exec chmod 755 {} \;

Replace 644/755 with apropriate permissions.

But be carefull with this command, it will change permissions for a lot of files if used the wrong way.
For more information about find, use the manualpages: man find.
Jens-Christian Skibakk
MMS Blog - http://mms.pipp.no/
Joomla! i Norge / Joomla! in Norway - http://www.joomlainorge.no/

averdier
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Feb 19, 2009 9:29 pm

Re: How to CHMOD files or folders only?

Post by averdier » Wed Apr 08, 2009 3:48 pm

silentz wrote:Hi there,

I know that Joomla has a tool to change all files or all folders to a particular CHMOD setting but as I can't get into Joomla yet (because of permissions) I'm wondering who knows the command to CHMOD all folders (but not files) in a directory, or vice versa.

Thanks!
Hi there, I am kinda new with Joomla! and I just installed a really nice Photo Gallery from Ozio.
Unfortunetely It does not work?

I think the reason is I am asked to change the following: Make sure permits are correct: CHMOD 755 the folder containing your photos and CHMOD 644 the file gallery.php (on some server it's necessary to set the CHMOD 777 to the folder containing your photos and CHMOD 666 to file gallery.php) make these tests if you don't view the photos.

What do they mean by that?
I located the folder on my PC (BTW I am running Joomla in localhost) and I right clicked the folder to find extra options to CHMOD but without success?
Could someone please help me on this one?

Thanks very much :)

User avatar
Chris
Joomla! Guru
Joomla! Guru
Posts: 812
Joined: Sat Aug 20, 2005 3:58 am
Location: Australia
Contact:

Re: How to CHMOD files or folders only?

Post by Chris » Wed Apr 08, 2009 10:57 pm

By using a local computer under "localhost", most likely you have apache setup under windows.

As far as I know, "Widows" does not have a facility to "chmod"
The only thing you can do there is right clicking on a folder or file and clicking on "prperties" there is a way to set things to read only and/or hide.

However, some FTP program's will allow you to set your files/folder to any permission, even local ones on a windows computer. Just navigate with that FTP program to the files/folders and see what you can do.
Having said that, I would not think that resetting the permissions is needed unless the files/folders are set to read only by default.
There is no failure until you give up.

Chris

burket
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Sat May 30, 2009 12:16 pm

Re: How to CHMOD files or folders only?

Post by burket » Thu Nov 19, 2009 1:33 pm

hi

i am using extplorer to c my files. the chmod icon is disabled and thus i can change permissions.

any idea how i can change this


regards


burket


Locked

Return to “Security - 1.0.x”