cancel
Showing results for 
Search instead for 
Did you mean: 

Change the access of Files on SAP Directories.

Former Member
0 Kudos

hi al,

i need to Change the access of Files on SAP Directories through SHELL SCRIPT via some Report, please guide me to do such. i have no idea of this.

i have to change the Descriptors of Files to permitt full access.i.e. 777(i guess).

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Please check [this|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/0a/0a2e36ef6211d3a6510000e835363f/frameset.htm] and build your script..

Kind regards,

Mark

Former Member
0 Kudos

it just shows the access definations & ways, here i want to know how to incorporate all these with ABAP ?

hope you have understand my view now .

Former Member
0 Kudos

Why do you want to change directory permissions via ABAP? You could create a shell script and execute it via transaction SM69. Or create an entry for the chmod command in SM69 to change file/directory permissions.

Kind regards,

Mark

Former Member
0 Kudos

hi mark,

i need to delete some specific directories which had to be replaced with new one durind ABAP execution,

so i need to delete old directories before creation of new.

& since it is not allowing user just because of limited Access, so i need to change the Access preveligaes before the delete statement.

Former Member
0 Kudos

Ok, in that case you have to create a command in SM69 with OS command /usr/bin/chmod or /usr/sbin/chmod (depends on your OS), and with this command you can change the permissions.

Kind regards,

Mark

Former Member
0 Kudos

hi mark,when i am doing the same as suggested by you , it is giving error as

"Can't exec external program (No such file or directory)

External program terminated with exit code 1"

but the files is there, the thing is that i am not sure that what to provide at EXECUTION TARGET, local or name of whcih Target host or which Target Destination.

Also i want to mention that i have given the additinal parameter as "700 /DC1/int/out/pp/shell script.txt"

where 700 is the access, & rest is address of file on sap directory.

Former Member
0 Kudos

What Unix flavor are you running? Have you tried /usr/bin/chmod and /usr/sbin/chmod? In case you make a chmod command, you cannot provide a script.. It's easier to create a script that performs the chmod for you, but I understand that you don't have access to the system itself..

So in case you need to change all files and dirs under /tmp/test, you could create the chmod command in SM69 and execute it with the parameters -R /tmp/test

Kind regards,

Mark

Former Member
0 Kudos

Thanks mark, i am almost done , but hting is that, when i am doing the chmod 000 <file address>, in abap report, then it sets the acess to no access as obvious(i have checked from AL11),

but when i use a delete dataset command below that, it stil is deleteing that file at sap directory.

i am feeling that is it require any kind of Commit or time delay to make that happen correctly?

Former Member
0 Kudos

Hello All,

i need to provide the no-access to a user to not to delete the files of SAP-directory, i know one way by changing the security descriptors of file through Shell Script/Unix called from ABAP Report before the DELETE DATASET comand.

*i have put the code to change the Access, as chmod 000 <file name>,*

& it is successful also, (i.e. when i want to see the file nw it is not displaying it), but i am still ablwe to delete it via ABAP code,

i am mising some thread . please help

Former Member
0 Kudos

*

i have put the code to change the Access, as chmod 000 <file name>,*
& it is successful also, (i.e. when i want to see the file nw it is not displaying it), but i am still ablwe to delete it via ABAP code,

I would suggest you to read man pages of chmod. (man chmod). Since you have given 000 you are not able to delete the file.

Former Member
0 Kudos

Since you have given 000 you are not able to delete the file.

Sorry to disagree.

If you chmod 000 file, you will still be able to rm -f file, as long as you have got write permission in the directory of the file.

As a workaround you might also consider the sticky bit.

Former Member
0 Kudos

i am still not done guys, please help

Former Member
0 Kudos

Hi,

Login with root first : sudo sh and assign full permissions to that file: chmod 777 <file name> and if its owner is something else in which you dnt have access change it to <sidadm> using chown <owner> : <group>.

Edited by: Sonia23 on Feb 2, 2011 7:05 AM