Allow user without dir write permission to execute a script that creates files


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Allow user without dir write permission to execute a script that creates files
# 15  
Old 01-08-2014
I think sudo is successful because it is setuid-root.
Then it can do a setuid(0) to remove restrictions, maybe along with some other magic, and finally it can setuid(user) to switch to a user and run an unrestricted exec().
If you have time, study the sudo source files (sudo.c etc.)!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Assign read write permission to the user for specific dir and it's sub dir and files in AIX

I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. I do not want to assign user the same group of that directories too.... (0 Replies)
Discussion started by: blinkingdan
0 Replies

2. UNIX for Beginners Questions & Answers

Setting write permission for particular user

Hi All, We have a scenario in production where we want only one user from a group to modify the file. The file is not set to write permission for application manager. -r--r--r-- 1 amgr u00 15661716 Aug 30 00:06 DCI.dat So here amgr will have permission to edit the file. We want a... (10 Replies)
Discussion started by: arunkumar_mca
10 Replies

3. Web Development

Apache write permission issues to another user owned directory

Hi I am trying to make a web program which is command line equivalent. i have done the coding in cgi program in perl and html for basic forms to take inputs. when i ran the program from web application i see permission denied messages. after analyzing i found apache is running as wwwrun which... (2 Replies)
Discussion started by: rakeshkumar
2 Replies

4. UNIX for Dummies Questions & Answers

Provide execute permission to a user

Hi, I have a shell script(test.sh) and need to give execute permission for this shell script to user group cobr_sftp and oracle. Could you please help as to how to give this permission. I have already given full access(777) to script test.sh. Does this mean all the users/user group can access... (1 Reply)
Discussion started by: abhi_123
1 Replies

5. Shell Programming and Scripting

perl script to check read/write/execute permission for 'others'

I want to check access rights permissions not for 'user', not for 'group', but for 'others'. I want to do it by system command in which i want to use 'ls -l' and 'awk' command. I have written the following program : #!/usr/bin/local/perl #include <stdlib.h> system ("ls -l | awk... (1 Reply)
Discussion started by: shubhamsachdeva
1 Replies

6. Shell Programming and Scripting

search any user files with write permission

Guys, i wanna get any user files with write permission (on user or group permission) for review but i confuse with -perm parameter. any body can help me to explain what is that mean? thank's (1 Reply)
Discussion started by: michlix
1 Replies

7. Shell Programming and Scripting

write permission to a perticular user to a directory

Hi, The requirement is like, the program needs 2 argument one is user_id and second one is directory path. My script will check if that user_id has write access to the directory path. The directory path may be in any file system like AFS or NFS. Can any one please suggest some points to... (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

8. Solaris

cant able to change permission in a DIR as root user

Hi my directory not accepting any commands. its simply telling permission denied. i tried ( cp, mv, rm ) as roor i want to set default permissons to this DIR please find the Logs below. dr-xr-xr-x 1 root root 1 Jun 1 09:04 AP1_ROP ( original dir) root> chmod 777... (5 Replies)
Discussion started by: vijayq8
5 Replies

9. Shell Programming and Scripting

Find all files with group read OR group write OR user write permission

I need to find all the files that have group Read or Write permission or files that have user write permission. This is what I have so far: find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}' It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
Login or Register to Ask a Question
asetenv(4)							   File Formats 							asetenv(4)

NAME
asetenv - ASET environment file SYNOPSIS
/usr/aset/asetenv DESCRIPTION
The asetenv file is located in /usr/aset, the default operating directory of the Automated Security Enhancement Tool (ASET). An alterna- tive working directory can be specified by the administrators through the aset -d command or the ASETDIR environment variable. See aset(1M). asetenv contains definitions of environment variables for ASET. There are 2 sections in this file. The first section is labeled User Configurable Parameters. It contains, as the label indicates, environ- ment variables that the administrators can modify to customize ASET behavior to suit their specific needs. The second section is labeled ASET Internal Environment Variables and should not be changed. The configurable parameters are explained as follows: TASK This variable defines the list of tasks that aset will execute the next time it runs. The available tasks are: tune Tighten system files. usrgrp Check user/group. sysconf Check system configuration file. env Check environment. cklist Compare system files checklist. eeprom Check eeprom(1M) parameters. firewall Disable forwarding of IP packets. CKLISTPATH_LOW These variables define the list of directories to be used by aset to create a checklist file at the low, medium, CKLISTPATH_MED and high security levels, respectively. Attributes of all the files in the directories defined by these variables "small and bold">CKLISTPwillHIbe checked periodically and any changes will be reported by aset. Checks performed on these directories are not recursive. aset only checks directories explicitly listed in these variables and does not check subdirectories of them. YPCHECK This variable is a boolean parameter. It specifies whether aset should extend checking (when applicable) on system tables to their NIS equivalents or not. The value true enables it while the value false disables it. UID_ALIASES This variable specifies an alias file for user ID sharing. Normally, aset warns about multiple user accounts shar- ing the same user ID because it is not advisable for accountability reason. Exceptions can be created using an alias file. User ID sharing allowed by the alias file will not be reported by aset. See asetmasters(4) for the for- mat of the alias file. PERIODIC_SCHEDULE This variable specifies the schedule for periodic execution of ASET. It uses the format of crontab(1) entries. Briefly speaking, the variable is assigned a string of the following format: minutes hours day-of-month month day-of-week Setting this variable does not activate the periodic schedule of ASET. To execute ASET periodically, aset(1M) must be run with the -p option. See aset(1M). For example, if PERIODIC_SCHEDULE is set to the following, and aset(1M) was started with the -p option, aset will run at 12:00 midnight every day: 0 0 * * * EXAMPLES
Example 1: Sample asetenv file showing the settings of the ASET configurable parameters The following is a sample asetenv file, showing the settings of the ASET configurable parameters: CKLISTPATH_LOW=/etc:/ CKLISTPATH_MED=$CHECKLISTPATH_LOW:/usr/bin:/usr/ucb CKLISTPATH_HIGH=$CHECKLISTPATH_MED:/usr/lib:/usr/sbin YPCHECK=false UID_ALIASES=/usr/aset/masters/uid_aliases PERIODIC_SCHEDULE="0 0 * * *" TASKS="env sysconf usrgrp" When aset -p is run with this file, aset is executed at midnight of every day. The / and /etc directories are checked at the low security level; the /, /etc, /usr/bin, and /usr/ucb directories are checked at the medium security level; and the /, /etc, /usr/bin, /usr/lib, and /usr/sbin directories are checked at the high security level. Checking of NIS system files is disabled. The /usr/aset/masters/uid_aliases file specifies the used IDs available for sharing. The env, sysconf, and usrgrp tasks will be performed, checking the environment vari- ables, various system tables, and the local passwd and group files. SEE ALSO
crontab(1), aset(1M), asetmasters(4) ASET Administrator Manual SunOS 5.10 13 Sep 1991 asetenv(4)