Sponsored Content
Top Forums Shell Programming and Scripting Help- writing to dir with no write permissions (script) Post 302765757 by Reb0rn on Sunday 3rd of February 2013 09:29:36 AM
Old 02-03-2013
Quote:
Originally Posted by RudiC
This is only 1/3 of what I asked you to post. What user are you? Should you be root, no wonder you can write to that dir. Should you not be rot, we need the xtrace log.

i am user root yes.. would that be the reason? sorry-- noob on unix. but why then we have to chmod every script to run it?

also .. the dir has no write permissions ..does root user overwrite this?

i have ran the trace.. shows the following.


Code:
[root@localhost no_write_perm]# sh directorycheck.sh 
sh directorycheck.sh 
+ sh directorycheck.sh
 please enter the dir path
/var/tmp/no_write_perm
 File hello.out is created
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}"; echo -ne "\007"
++ echo -ne '\033]0;root@localhost:/var/tmp/no_write_perm'
[root@localhost no_write_perm]#


Last edited by Reb0rn; 02-03-2013 at 10:35 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File and Dir permissions

I would like to configure my SuSE 7.0 workstation more securely. I have attempted for about two weeks to find a guideline on good practices for the file and directory permissions.........but to no avail. Does anyone have a guideline that I could use to help me out. I realize that the distros are... (11 Replies)
Discussion started by: thomas.jones
11 Replies

2. Shell Programming and Scripting

writing files to a dir in round robin order

I have a list of directories. (say a1,a2,a3,a4,a5) I need to get the directory last modified and access the next one to put some files over there (say if a3 is the latest dir modified ie, last time files were put into a3, this time I need to move the files in a4)...and if a5 is the last modified... (6 Replies)
Discussion started by: kanchan_cp
6 Replies

3. Shell Programming and Scripting

i want to write a script to test the folder permissions

Hi All, I want a script to test folder permissions.( to alert me if a folder /abc/xyz does not have 775 permissions). i want to test /abc/xyz is having 775 permissions or not if not it has to alert me. Please help me ASAP Thanks in advance (4 Replies)
Discussion started by: rajesh212512
4 Replies

4. Shell Programming and Scripting

Shell Script to save/restore files and dir permissions

Hello all: I need found script to save and restore file permissions and owner:group... this is for backup my server... I have one problem in my server and file permissions and owner:group, mess up.. For this reason i need found one way to secure this aspect of the server... Thanks! (1 Reply)
Discussion started by: joangopan
1 Replies

5. Shell Programming and Scripting

to write a script to compare the file size in the current directory and previous dir

hi, i am new to this site. i want to write a script to compare the file size of the files in the current dir with the files in the previous directory. the files name will be same, but the filename format will be as xyzddddyymm.txt. the files will arrive with the month end date(i want to... (5 Replies)
Discussion started by: tweety
5 Replies

6. Shell Programming and Scripting

help writing rm script excluding specific titled dir

I am attempting to write a housecleaning script that does the following: 1) goes to a specific directory 2) deletes all contents of that directory but a specific directory within it. So my users all keep and use the Shared directory in OSX. Within /Users/Shared there are also standard named... (1 Reply)
Discussion started by: nomados
1 Replies

7. Shell Programming and Scripting

Dir permissions

Hi All, I have a script which will be run by another user say user 2 which will create a new dir say dir 4 in my work place and copy certains files from his dir. /t1/t2/t3/dir4 I want to allow the user to create the dir dir4 and copy the files,but bring the control back to my name say user... (2 Replies)
Discussion started by: prasperl
2 Replies

8. Shell Programming and Scripting

Have files take on DIR permissions

Hello all; I have a question based on a ticket I have from a user... K...first some background...this client needed a generic user setup to allow them to ftp files; user is called "msifpt"...so here's what they want to do now with this account: 1. Client will use the user id ‘msiftp'... (1 Reply)
Discussion started by: gvolpini
1 Replies

9. UNIX for Advanced & Expert Users

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

In our project we have several unix scripts that trigger different processes. These scripts write logs to a particular folder 'sesslogs', create output data files in a separate directory called 'datafiles' etc. Usually L1 support team re-run these scripts . We donot want L1 support team to have... (14 Replies)
Discussion started by: waavman
14 Replies

10. 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
MKCOMPOSECACHE(1)                                             General Commands Manual                                            MKCOMPOSECACHE(1)

NAME
mkcomposecache - create a cache file for a compose file explicitely SYNOPSIS
mkcomposecache locale compose-file cache-dir [ internal-name ] DESCRIPTION
mkcomposecache creates a cache file for the specified compose-file used in the given locale and saves it in cache-dir. If internal-name has been spezified, it is used as the name of the compose table for computing the hash values and internal validation. This is necessary if global compose cache files shall be created while using DESTDIR during X11 installation. Notes: - compose cache files are created by libX11, thus an Xserver has to be running and DISPLAY has to be set correctly for creating cache files. - libX11 will not write compose cache files if run as root or with different real and effective uids. - libX11 will not create compose cache files in directories writable for other users. DIAGNOSTICS
mkcomposecache returns with exit status 1 on general errors (no Xserver, invoked as root, etc.) and 2 on unsupported locales. An exit status of 0 does not imply that a cache file is actually written, though. This very much depends on the used libX11 and its safety regulations. EXAMPLES
mkcomposecache en_US.UTF-8 /var/tmp/buildroot/usr/share/X11/locale/en_US.UTF-8/Compose /var/tmp/buildroot/var/X11R6/compose_cache /usr/share/X11/locale/en_US.UTF-8/Compose FILES
/var/X11R6/compose_cache Location of global compose cache. AUTHOR
mkcomposecache was written by Matthias Hopf <mhopf@suse.de>. X Version 11 mkcomposecache 1.0 MKCOMPOSECACHE(1)
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy