Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

linux user setup

Thread Tools
 
Search this Thread
 
Old 06 May 2003, 12:28 PM
  #1  
Dizzy
Scooby Regular
Thread Starter
 
Dizzy's Avatar
 
Join Date: May 2001
Posts: 2,537
Likes: 0
Received 0 Likes on 0 Posts
Post

ok mad stab in the dark to see if anyone on here can help...
I have a program that telnets into my linux box and creates a directory. I dont have the src for this prog as it was done before I joined. Anyway it creates a dir and I need to change the permissions of that dir. Its a secure internal box so I dont need to worry about security etc. I just want it to create the dirs with "777".

I have edited my /etc/profile to have the umask of 000 below :
----------------------------------------------
# /etc/profile

# System wide environment and startup programs
# Functions and aliases go in /etc/bashrc

PATH="$PATH:/usr/X11R6/bin"


ulimit -c 1000000

# these used to be 002 and 022 respectivly
if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
umask 000
else
umask 000
fi
---------------------------------------------

but it still creates the dirs as such

"drwxr-xr-x 2 meep root 4096 May 6 11:56 01234"

is there another config file secreted away somewhere? or can any point me in the direction of a help file?
Thanks
Old 06 May 2003, 12:50 PM
  #2  
Andrewza
Scooby Regular
 
Andrewza's Avatar
 
Join Date: Jan 2002
Posts: 667
Likes: 0
Received 0 Likes on 0 Posts
Post

Assume you logged out and logged back in before testing, as profile is exected when your shell is started....
Old 06 May 2003, 01:38 PM
  #3  
Dizzy
Scooby Regular
Thread Starter
 
Dizzy's Avatar
 
Join Date: May 2001
Posts: 2,537
Likes: 0
Received 0 Likes on 0 Posts
Post

yup still no dice
Old 06 May 2003, 01:43 PM
  #4  
Dizzy
Scooby Regular
Thread Starter
 
Dizzy's Avatar
 
Join Date: May 2001
Posts: 2,537
Likes: 0
Received 0 Likes on 0 Posts
Post

infact files are now
"-rw-r--r-- 1 meep root 1913 May 6 13:21 ccc.gif"
Old 06 May 2003, 01:48 PM
  #5  
GaryCat
Scooby Regular
 
GaryCat's Avatar
 
Join Date: Apr 1999
Posts: 2,043
Likes: 0
Received 0 Likes on 0 Posts
Post

Look in the .profile of the user id that logs in, it may reset the umask. Also check .bash_profile depending on what shell the user uses.

It's not a good idea to put it in /etc/profile.... very bad practice security wise.
Old 06 May 2003, 02:15 PM
  #6  
Dizzy
Scooby Regular
Thread Starter
 
Dizzy's Avatar
 
Join Date: May 2001
Posts: 2,537
Likes: 0
Received 0 Likes on 0 Posts
Post

Thanks GaryCat Great that worked for the telnet in now.. although there was no reference to umask in the .bash_profile before I added one.. however.. I doesn't work if I use ftp even though its the same user that logs in

btw point take about bad practice / insecure but I'm pulling my hair out and this is on an internal only network Infact if that worries you you'll be terrified by my samba setup

[Edited by Dizzy - 5/6/2003 2:19:45 PM]

[Edited by Dizzy - 5/6/2003 2:34:39 PM]
Old 06 May 2003, 02:49 PM
  #7  
Dizzy
Scooby Regular
Thread Starter
 
Dizzy's Avatar
 
Join Date: May 2001
Posts: 2,537
Likes: 0
Received 0 Likes on 0 Posts
Post

EXCELENT!! me does a little dance

just needed to update the ftpaccess and add "defumask 000"

"Hard work pays of tomorrow but lazyness pays off today"
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
shorty87
Full Cars Breaking For Spares
19
22 December 2015 11:59 AM
psport
Subaru Parts
3
04 October 2015 07:35 PM
Pro-Line Motorsport
Car Parts For Sale
2
29 September 2015 07:36 PM
shorty87
Wheels And Tyres For Sale
0
29 September 2015 02:18 PM



Quick Reply: linux user setup



All times are GMT +1. The time now is 08:26 PM.