Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

CP Command always return "permission denied"

Hi,

i run bamboo on my server besides tomcat and i want to make a copy command from "script" task of bamboo to the tcat webapps folder.

If i run (inline script):

cp /var/atlassian/../TestApp.war /opt/tomcat/webapps

cp: cannot stat '/opt/tomcat/webapps/TestApp.war': Permission denied

 

If i run the shell:

su - bamboo
cp /var/atlassian/../TestApp.war /opt/tomcat/webapps

=> everthing is fine

 

background:

  • Also tried with file script => same result
  • bamboo is owner of the tomcat folder (&webapps)
  • bamboo is owner of his home dir and the build dir

 

I am at a loss. The entire configuration was a homerun. A line script stops everything.

Thank you in advance! Cheers for Atlassian and their incredible products!

Marco

1 answer

1 accepted

2 votes
Answer accepted

Silly question, but does bamboo actually run as the bamboo user? 

Does the file TestApp.war already exist? 

-Lars

hi,

1. yes. maybe there is a way to determine this?

2. yes, but tested without (after removing)

thanks lars!

ps aux | grep bamboo should list bamboo as the running user (first thing on the line)

Try  cp -f /var/atlassian/../TestApp.war /opt/tomcat/webapps to overwrite the file. (I think this is what causes the error)

Oh no. -force does the trick. sorry and thanks!

 

While i was investigating the console says "whoami" "bamboo" inside inline script.

 

Thanks a lot lars!

No worries Marc! That`s why we are here.

Please mark the answer as solved

 

Cheers,

Lars, Kantega Single Sign-on

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

684 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you