LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 08-08-2004, 12:46 AM   #1
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Rep: Reputation: 31
Default directory and file permissions


by default in /home/user:
all new directories are 755
and all new files are 644

is this secure?
and is there a way to change what the permissions are automatically so i don't have to chmod everything i create?
 
Old 08-08-2004, 02:15 AM   #2
Archite
Member
 
Registered: Jul 2004
Distribution: OpenBSD 3.5
Posts: 89

Rep: Reputation: 15
Well, what you can do so that all files and directories created are not group/world readable is to edit /etc/bashrc and find the line that says umask. Change that to 0077. Another thing that I could recomend for security reasons is to put each user in there own group and change the permissions on their home directores to 700. This will keep nosey people out of other people's home directories.
 
Old 08-08-2004, 02:20 AM   #3
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Original Poster
Rep: Reputation: 31
there isn't a file /etc/bashrc
and slocate didn't find bashrc
 
Old 08-08-2004, 02:34 AM   #4
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Original Poster
Rep: Reputation: 31
i did find umask in /etc/profile
changed it to 0077 there

as for the home directories
how would you set 700 automatically or do you have to manually chmod them?
 
Old 08-08-2004, 02:36 AM   #5
Archite
Member
 
Registered: Jul 2004
Distribution: OpenBSD 3.5
Posts: 89

Rep: Reputation: 15
okay. What you can do is check your .bash_profile, .profile, or .bashrc in your home directory and find out where the system config file is. Actually, if I remeber on slackware, it may be either /etc/profile, or /etc/bash.profile. Either way, the config files in your home directory will point to it. Find it and change the umask.



KDON, you're too quick!

Last edited by Archite; 08-08-2004 at 02:39 AM.
 
Old 08-08-2004, 02:39 AM   #6
Archite
Member
 
Registered: Jul 2004
Distribution: OpenBSD 3.5
Posts: 89

Rep: Reputation: 15
well, for the users that you have already set up, you chan chmod those. If you're using the adduser script, I think that there is a config file somewhere in etc, but I would read over the man page for it because I don't know where it is off the top of my head. You could also write your own adduser script to do it if you don't want to waste the time trying to find the config file, LoL
 
Old 08-08-2004, 03:07 AM   #7
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Original Poster
Rep: Reputation: 31
lol...

you say i should have a bash or profile in my /home/user dir? i don't see anything like that except for a bash_history file. i take it that the /etc/bashrc or /etc/profile are global settings and the /home/user/.bashrc or /home/user/.profile would be user specific...so is it a problem i don't have any local configuration files?

the script /usr/sbin/adduser has in itself a line
defchmod=711 # home dir permissions - may be preferable to use 701, however.
i had used KUser to add the current users, after i saw this i created a test user using the adduser script and the resulting directory was 755...

anyways, still looking for another config file that adduser might refer to
 
Old 08-08-2004, 04:10 AM   #8
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Original Poster
Rep: Reputation: 31
noticed my shell was sh...changed it to bash and rebooted
now, the adduser script produces new home folders that are 711 but KUser still produces 755
[so my assumption that KUser was a frontend to adduser must be wrong]

didn't think there was much of a difference between the shells
 
Old 08-08-2004, 04:14 AM   #9
Ninaw
Member
 
Registered: Jun 2004
Location: QC, Philippines
Distribution: Ubuntu
Posts: 30

Rep: Reputation: 15
that's because on most systems, sh is just a symlink for bash
 
Old 08-08-2004, 04:24 AM   #10
Archite
Member
 
Registered: Jul 2004
Distribution: OpenBSD 3.5
Posts: 89

Rep: Reputation: 15
You shouldn't worry if you don't have them. Most systems have them in their home directory by default but every system is different. Now, I assume that KUser is some sort of KDE application. You should be able to configure it in the kde config files which I believe are in /opt/ somewhere.

Last edited by Archite; 08-08-2004 at 04:26 AM.
 
Old 08-08-2004, 09:27 AM   #11
kodon
Member
 
Registered: Jul 2004
Location: [jax][fl][usa]
Distribution: Slackware64-current
Posts: 796

Original Poster
Rep: Reputation: 31
yes, KUser is an admin tool in KDE. i couldn't find anything in /opt, so i went and checked the bugs at kde...the 755 access is builtin, and the only way to change it is through ./configure at compile time (in a future release). i may be a noob, but this seems like a major flaw to me...guess i'll be using the shell


just noticed i'm not listed as a noob anymore...i'm a member. yay!!!
wonder how long ago that changed

Last edited by kodon; 08-08-2004 at 09:30 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Default directory permissions gwroy20 Linux - Software 7 08-28-2005 05:30 PM
Change default file permissions bmorel Linux - Newbie 4 05-08-2005 08:06 PM
directory permissions reverting to default Edrin Linux - Newbie 4 11-18-2004 12:05 PM
Default Directory Permissions tranquil222 Linux - Software 8 05-20-2004 06:10 PM
Is it possible to create default file permissions? Thermodynamic Linux - Software 3 04-09-2004 06:28 PM


All times are GMT -5. The time now is 06:10 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration