One user to su to another without allowing root access and password

Hello Gurus,
I want One user to su to another without allowing root access and password.
I want to run a specific command as below from user am663:
---------------------------------------------------------

sudo -u appsprj4 /home/appsrj4/scripts/start_apache.sh

-------------------
But everytime I am facing the below error

[sudo] password for am663:
sudo: /home/appsrj4/scripts/stop_oacore.sh: command not found

----------
Below is the entry from /etc/sudoers file:
------------------------

am663   ALL=(appsprj4)          NOPASSWD: /home/appsprj4/scripts/start_apache.sh
am663   ALL=(appsprj4)          NOPASSWD: /home/appsprj4/scripts/stop_apache.sh
am663   ALL=(appsprj4)          NOPASSWD: /home/appsprj4/scripts/start_oacore.sh
am663   ALL=(appsprj4)          NOPASSWD: /home/appsprj4/scripts/stop_oacore.sh
am663   ALL=(appsprj4)          NOPASSWD: /u03/oracle/EBSDEV/fs1/inst/apps/EBSDEV_emaprjebs01/admin/scripts/adapcctl.sh
am663   ALL=(appsprj4)          NOPASSWD: /u03/oracle/EBSDEV/fs1/inst/apps/EBSDEV_emaprjebs01/admin/scripts/admanagedsrvctl.sh

Please advice on this.

Thanks-
Pokhraj

sudo -u appsprj4 /home/appsprj4/scripts/start_apache.sh

Note the missing red letter p.

Awesome.. Thank you very much...

Thanks
Pokhraj

Hello Gurus,
I am having one more issue while running the command.

sudo -u appstst1 /stage/scripts/git_Code.ksh

When I am running the above command from user am663 all the files are downloaded as below:

drwxr-xr-x 2 appstst1 oinstall 4096 Apr 18 13:00 FIN_EXT_004
drwxr-xr-x 2 appstst1 oinstall 4096 Apr 18 13:00 FIN_EXT_003

Now when I am trying to change the ownership to oemuser I am facing error as

oemuser:oinstall

Is there is any extra configuration I need to add at /etc/sudoers file?

Please advice

Thanks-
Pokhraj Das

An application running as user appstst1 creates files belonging to appstst1, yes.

If the files are not overly large, you can get around this by making copies of the files(which will belong to you) then deleting the originals(you can delete any file in a writable folder you own).

Hello ,
Can you please elaborate the concepts please..

Thanks-
Pokhraj Das

A non-root user cannot change the ownership of someones else's file. One way to solve this problem is to have both users be a member of the same group and allow group access to the files. Since you are using the group oinstall now, you may want to create a separate group for this.

Set the primary group for the account that is executing the download (appstst1 in this case) to that new group so that the files are created with that group ownership. If you want the secondary user to also be able to delete/rename/etc these files then you should also set the umask in the script prior to performing the download

umask 007

This will set permissions on new files/directories created during that session to 770.