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.
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 And i am not that into security...
]]>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.
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?
]]>See the fix function in my .bashrc
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 i understand some of it.
]]>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.
edit: what about these other permissions other people mentioned?
]]>By the way, I once had a similar problem, I solved it with find:
find ~ -type d -exec chmod 755 {} \;
find ~ -type f -exec chmod 644 {} \;
EDIT: Hehe, looks like graysky2's solution.
]]>edit: sorry if i frustrate you but this is a chance to learn these permissions thing (i studied it on college but we didn't discuss what happens in those cases ).
]]>igndenok@merkava ~ $ ls -l ..
total 16
drwx------ 52 igndenok igndenok 12288 Jul 11 17:35 igndenok
drwx------ 2 root root 4096 Jun 8 2010 lost+found
Edit: Inside $HOME
igndenok@merkava ~ $ ls -l
total 172
-rw-r--r-- 1 igndenok igndenok 1715 Dec 9 2010 allan.pl
-rw-r--r-- 1 igndenok igndenok 753 Sep 12 2010 arch1
-rw-r--r-- 1 igndenok igndenok 3011 Sep 12 2010 arch2
-rwx------ 1 igndenok igndenok 3821 Jul 9 20:44 bj-pics.rb
drwx------ 6 igndenok igndenok 4096 Jun 15 22:32 Desktop
drwx------ 10 igndenok igndenok 20480 Jul 9 20:11 Documents
drwx------ 10 igndenok igndenok 40960 Jul 11 19:56 Downloads
-rwxr-xr-x 1 igndenok igndenok 327 May 28 21:52 euclid.pl
-rw-r--r-- 1 igndenok igndenok 289 Jul 4 10:14 ex-ecm.txt
-rw-r--r-- 1 igndenok igndenok 747 Jul 4 21:33 gitrev.sh
-rw-r--r-- 1 igndenok igndenok 2277 Jul 7 13:37 iptables.rules
-rw-r--r-- 1 igndenok igndenok 2769 Jul 8 14:50 list
-rwx------ 1 igndenok igndenok 281 Sep 13 2010 log-to-pkglist.awk
-rwxr-xr-x 1 igndenok igndenok 2339 Jun 18 10:36 mangascan.rb
-rw-r--r-- 1 igndenok igndenok 1163 Jun 7 22:35 mbrainz.rb
-rw-r--r-- 1 igndenok igndenok 2852 Jul 11 03:07 mkinitcpio-merkava.conf
drwx------ 2 igndenok igndenok 4096 Dec 3 2010 Music
-rwxr-xr-x 1 igndenok igndenok 3742 Dec 22 2010 ompload.rb
drwx------ 5 igndenok igndenok 4096 Jul 9 00:59 Pictures
-rwxr-xr-x 1 igndenok igndenok 1073 Sep 18 2010 pkgextract.sh
-rw-r--r-- 1 igndenok igndenok 820 Jul 4 19:07 PSX-ISO
drwx------ 5 igndenok igndenok 4096 Jul 2 21:28 Public
-rw-r--r-- 1 igndenok igndenok 1258 Jul 11 12:18 quote.org
-rw-r--r-- 1 igndenok igndenok 369 Jun 29 21:03 saz3d.txt
-rw-r--r-- 1 igndenok igndenok 95 Jul 8 21:29 thousand_arms
-rw-r--r-- 1 igndenok igndenok 131 Jul 9 22:18 tmp.txt
drwx------ 13 igndenok igndenok 4096 Jul 9 14:56 Videos
-rw-r--r-- 1 igndenok igndenok 752 May 31 21:16 zenburn.css
Edit #2: Inside $HOME/Pictures
igndenok@merkava ~ $ ls -l Pictures
total 1160
-rw-r--r-- 1 igndenok igndenok 1070250 May 23 2009 bg.png
-rw-r--r-- 1 igndenok igndenok 5320 Oct 1 2010 c342ea31141423_flip.png
drwxr-xr-x 4 igndenok igndenok 4096 Jul 8 14:26 h-f
-rw-r--r-- 1 igndenok igndenok 295 Jul 9 00:57 igndenok.png
drwx------ 2 igndenok igndenok 4096 Feb 27 2010 Kamen Rider
-rw------- 1 igndenok igndenok 3519 Feb 5 2008 phoenix_wright.gif
-rw------- 1 igndenok igndenok 3343 Oct 3 2010 Phoenix Wright.svg
-rw------- 1 igndenok igndenok 6760 Jan 7 2010 screenshot-1.png
-rw------- 1 igndenok igndenok 6060 Jan 7 2010 screenshot-2.png
-rw------- 1 igndenok igndenok 6144 Jan 7 2010 screenshot-3.png
-rw------- 1 igndenok igndenok 5515 Jan 7 2010 screenshot-4.png
-rw------- 1 igndenok igndenok 6343 Jan 7 2010 screenshot-5.png
-rw------- 1 igndenok igndenok 5985 Jan 7 2010 screenshot-6.png
drwx------ 2 igndenok igndenok 4096 Oct 8 2010 TuX
Edit #3: Now that AurosGamma mentioned it, I do have some files from my FAT32 partition with (old) permission 755.
]]>The default permissions for a Home folder (when you create a user) is 700, the content usually is 755, probably because you copied your data from a fat32 drive, or a filesystem without permissions capabilities, so these are the default permissions in this case.
If i were you i would do the following:
$ chmod 700 ~ && cd ~ && chmod -R 755 ./*
Greetings.
This changed everything to 755, files and folders... :S Is this right? http://i.imgur.com/j5Dlx.png
My home folder is "drwx------"
]]>If i were you i would do the following:
$ chmod 700 ~ && cd ~ && chmod -R 755 ./*
Greetings.
]]>Typically, users go with either 700 (private) or 755 (read) for their $HOME.
I agree with that. By default everytime I create folder/file in my $HOME, I get :
1. 700 for all folder
2. 755 for all file
Maybe you should change all inside your $HOME with 700 for folder and 755 for file first,
and then (maybe) you check again all folder/file (maybe for folder/file owner and group)