I would like to do this:

XXXX:xxxadm 53> cp /user/uz408217/transporty/K900730.ZAT /usr/sap/trans/cofiles

But end up with this error:

cp: cannot create regular file `/usr/sap/trans/cofiles/K900730.ZAT': Permission denied

Here are the permissions of concerned directories:

drwxrwx--x  2 root   sapsys      69632 Jun 25 13:35 cofiles
drwxrwx--x  2 root   sapsys      61440 Jun 25 13:35 data

Here you can see my user is, indeed, in group sapsys:

XXX:ap1adm 58> groups
sapsys sapinst dba oper oinstall asmdba asmoper

Any idea why I can't copy it there?

I've checked parent directories and they should be ok. .. :

drwxrwxrwx 20  17370 sapsys     4096 Jun 28 12:15 trans

../.. :

drwxr-xr-x  12 smdadm sapsys  4096 Aug  5  2017 sap

../../.. :

drwxr-xr-x  15 root   root      4096 Apr 15  2014 usr

"/usr" is not owned by any of group ap1adm is member of, but it has execute but for other, so that should not be a problem, right?

PS: Can, let's say, root override "default" working of permissions? I'm not sure wether I phrased this PS in a way that's clear what I want to know...

Thank you for your answers :)

  • Please add result of ls -l /usr/sap/trans/cofiles/K900730.ZAT – roaima Jun 28 '18 at 12:16
  • 1
    Do you have x permissions on the intermediate directories in the path /usr/sap/trans/cofiles? – Kusalananda Jun 28 '18 at 13:12

you are executing command cp by user ap1adm. as I see directory cofiles doesn't have permission on others. sapsys group has full permission on directory cofiles. To assign these group permissions to user ap1adm , user should be in group as he is and *user should be owner of the group sapsys. so make ap1adm group owner of directory sapsys. You can use following commands:

chgrp  ap1adm  /usr/sap/trans/cofiles


chown  :ap1adm  /usr/sap/trans/cofiles
| improve this answer | |
  • User ap1adm is already a member of group sapsys, so group permissions apply to the situation. – roaima Jun 28 '18 at 13:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.