You are not logged in.

#26 2011-07-11 16:49:07

1lj4z1
Member
From: milky way galaxy
Registered: 2011-03-25
Posts: 63
Website

Re: Accidentaly changed file/folders permissions to 777...

graysky wrote:

could you please explain me what every line on the code...

fix() {
  if [ -d $1 ]; then
find $1 -type d -exec chmod 755 {} \;
    find $1 -type f -exec chmod 644 {} \;
  else
echo "$1 is not a directory."
fi
}

...does...? for educational purpose smile i understand some of it.

Last edited by 1lj4z1 (2011-07-11 16:49:40)

Offline

#27 2011-07-11 16:50:39

1lj4z1
Member
From: milky way galaxy
Registered: 2011-03-25
Posts: 63
Website

Re: Accidentaly changed file/folders permissions to 777...

igndenok wrote:

Copying from FAT32, folder/file still preserve its permission from FAT32 in my $HOME.
But, when you copy to FAT32, folder/file doesn't preserve its permission from source partition.
I set this options in my fstab (options for FAT32 partition)

gid=users,dmask=007,fmask=117,iocharset=utf8

If I copy to FAT32, folder/file permission are set to 770/660.
Even my original folder/file permission are set to 700/644.

why is that? for security?

Offline

#28 2011-07-11 18:52:19

igndenok
Member
From: Sidoarjo, Indonesia
Registered: 2010-06-07
Posts: 160

Re: Accidentaly changed file/folders permissions to 777...

1lj4z1 wrote:

why is that? for security?

Mainly for my convinience use.
No x permission for files are obviously because not all of my files in that partition is script (executable), even it's a script I don't want to make it executable.
For "now" maybe it's only me that use Arch, but maybe in the future there's another user beside me.
So I set it to users group for that partition, because I don't want to change again later if that user need an access to that partition
(and yes I use users group because its "make sense" to me).
As for no permission for others beside owner and groups its just a basic security. Again its my personal settings and opinions. smile


Ask, and it shall be given you.
Seek, and ye shall find.
Knock, and it shall be opened unto you.

Offline

#29 2011-07-11 19:39:19

1lj4z1
Member
From: milky way galaxy
Registered: 2011-03-25
Posts: 63
Website

Re: Accidentaly changed file/folders permissions to 777...

igndenok wrote:
1lj4z1 wrote:

why is that? for security?

Mainly for my convinience use.
No x permission for files are obviously because not all of my files in that partition is script (executable), even it's a script I don't want to make it executable.
For "now" maybe it's only me that use Arch, but maybe in the future there's another user beside me.
So I set it to users group for that partition, because I don't want to change again later if that user need an access to that partition
(and yes I use users group because its "make sense" to me).
As for no permission for others beside owner and groups its just a basic security. Again its my personal settings and opinions. smile

I just want to access my files and not lose access to them. I don't have any other users on my computer and I hope I will never have tongue And i am not that into security... tongue

Offline

Board footer

Powered by FluxBB