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 May 6, 2003 | 12:28 PM
  #1  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
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
Reply
Old May 6, 2003 | 12:50 PM
  #2  
Andrewza's Avatar
Andrewza
Scooby Regular
 
Joined: Jan 2002
Posts: 667
Likes: 0
Post

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

yup still no dice
Reply
Old May 6, 2003 | 01:43 PM
  #4  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
Post

infact files are now
"-rw-r--r-- 1 meep root 1913 May 6 13:21 ccc.gif"
Reply
Old May 6, 2003 | 01:48 PM
  #5  
GaryCat's Avatar
GaryCat
Scooby Regular
 
Joined: Apr 1999
Posts: 2,044
Likes: 0
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.
Reply
Old May 6, 2003 | 02:15 PM
  #6  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
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]
Reply
Old May 6, 2003 | 02:49 PM
  #7  
Dizzy's Avatar
Dizzy
Thread Starter
Scooby Regular
 
Joined: May 2001
Posts: 2,537
Likes: 0
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"
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
Nov 4, 2021 07:12 PM
shorty87
Full Cars Breaking For Spares
19
Dec 22, 2015 11:59 AM
psport
Subaru Parts
3
Oct 4, 2015 07:35 PM
Pro-Line Motorsport
Car Parts For Sale
2
Sep 29, 2015 07:36 PM
shorty87
Wheels And Tyres For Sale
0
Sep 29, 2015 02:18 PM




All times are GMT +1. The time now is 12:16 PM.