How can I run dotnet on ubuntu without using sudo?
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
2
down vote
favorite
I've been trying to update the permissions so that I can run a command (specificially dotnet restore
). I'm not sure if this issue is specific to running dotnet
, or if it is more generic.
I can run the command using sudo dotnet restore
, however I want to be able to run this command without sudo
. This is because I want to execute these commands via a CI tool (Jenkins), and I don't want that tool to have access to root commands. . The Jenkins user is unable to run dotnet restore
(because of the errors below) or sudo dotnet restore
(because it doesn't have root access).
When I run without sudo
, I have the following errors from dotnet restore
:
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Access to the path '/file_path_to_project.csproj/obj' is denied.
[file_path_to_project.csproj]
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Permission denied [file_path_to_project.csproj]
I've been trying to update the read and write permissions for my user on the /usr/share/dotnet/sdk/2.1.104/NuGet.targets
file, and the file_path_to_project.csproj
directory, but so far I still get the same errors. Does it have something to do with the /obj
directory? â When I run ls
the obj
file is not shown.
How can I update the permissions so that I can access these files without running sudo
?
I created a /etc/sudoers.d/dotnet
file to see if it would enable dotnet
to be run without needing to call sudo
. I added the following contents: myusername myhostname = (root) NOPASSWD: /usr/bin/dotnet
. However, this still required me to run sudo
before dotnet restore
to get the correct output.
command-line permissions sudo dotnet
add a comment |Â
up vote
2
down vote
favorite
I've been trying to update the permissions so that I can run a command (specificially dotnet restore
). I'm not sure if this issue is specific to running dotnet
, or if it is more generic.
I can run the command using sudo dotnet restore
, however I want to be able to run this command without sudo
. This is because I want to execute these commands via a CI tool (Jenkins), and I don't want that tool to have access to root commands. . The Jenkins user is unable to run dotnet restore
(because of the errors below) or sudo dotnet restore
(because it doesn't have root access).
When I run without sudo
, I have the following errors from dotnet restore
:
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Access to the path '/file_path_to_project.csproj/obj' is denied.
[file_path_to_project.csproj]
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Permission denied [file_path_to_project.csproj]
I've been trying to update the read and write permissions for my user on the /usr/share/dotnet/sdk/2.1.104/NuGet.targets
file, and the file_path_to_project.csproj
directory, but so far I still get the same errors. Does it have something to do with the /obj
directory? â When I run ls
the obj
file is not shown.
How can I update the permissions so that I can access these files without running sudo
?
I created a /etc/sudoers.d/dotnet
file to see if it would enable dotnet
to be run without needing to call sudo
. I added the following contents: myusername myhostname = (root) NOPASSWD: /usr/bin/dotnet
. However, this still required me to run sudo
before dotnet restore
to get the correct output.
command-line permissions sudo dotnet
1
Comments are not for extended discussion; this conversation has been moved to chat.
â Thomas Wardâ¦
Apr 24 at 19:38
Would you please edit and clarify about the CI tool you're using? What is it, how does it operate? If you can rundotnet restore
via it, why can't you do the same withsudo dotnet restore
even without it having root permissions?
â dessert
Apr 25 at 6:39
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I've been trying to update the permissions so that I can run a command (specificially dotnet restore
). I'm not sure if this issue is specific to running dotnet
, or if it is more generic.
I can run the command using sudo dotnet restore
, however I want to be able to run this command without sudo
. This is because I want to execute these commands via a CI tool (Jenkins), and I don't want that tool to have access to root commands. . The Jenkins user is unable to run dotnet restore
(because of the errors below) or sudo dotnet restore
(because it doesn't have root access).
When I run without sudo
, I have the following errors from dotnet restore
:
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Access to the path '/file_path_to_project.csproj/obj' is denied.
[file_path_to_project.csproj]
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Permission denied [file_path_to_project.csproj]
I've been trying to update the read and write permissions for my user on the /usr/share/dotnet/sdk/2.1.104/NuGet.targets
file, and the file_path_to_project.csproj
directory, but so far I still get the same errors. Does it have something to do with the /obj
directory? â When I run ls
the obj
file is not shown.
How can I update the permissions so that I can access these files without running sudo
?
I created a /etc/sudoers.d/dotnet
file to see if it would enable dotnet
to be run without needing to call sudo
. I added the following contents: myusername myhostname = (root) NOPASSWD: /usr/bin/dotnet
. However, this still required me to run sudo
before dotnet restore
to get the correct output.
command-line permissions sudo dotnet
I've been trying to update the permissions so that I can run a command (specificially dotnet restore
). I'm not sure if this issue is specific to running dotnet
, or if it is more generic.
I can run the command using sudo dotnet restore
, however I want to be able to run this command without sudo
. This is because I want to execute these commands via a CI tool (Jenkins), and I don't want that tool to have access to root commands. . The Jenkins user is unable to run dotnet restore
(because of the errors below) or sudo dotnet restore
(because it doesn't have root access).
When I run without sudo
, I have the following errors from dotnet restore
:
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Access to the path '/file_path_to_project.csproj/obj' is denied.
[file_path_to_project.csproj]
/usr/share/dotnet/sdk/2.1.104/NuGet.targets(104,5): error : Permission denied [file_path_to_project.csproj]
I've been trying to update the read and write permissions for my user on the /usr/share/dotnet/sdk/2.1.104/NuGet.targets
file, and the file_path_to_project.csproj
directory, but so far I still get the same errors. Does it have something to do with the /obj
directory? â When I run ls
the obj
file is not shown.
How can I update the permissions so that I can access these files without running sudo
?
I created a /etc/sudoers.d/dotnet
file to see if it would enable dotnet
to be run without needing to call sudo
. I added the following contents: myusername myhostname = (root) NOPASSWD: /usr/bin/dotnet
. However, this still required me to run sudo
before dotnet restore
to get the correct output.
command-line permissions sudo dotnet
edited Apr 25 at 13:15
asked Apr 23 at 20:48
fuzzi
1265
1265
1
Comments are not for extended discussion; this conversation has been moved to chat.
â Thomas Wardâ¦
Apr 24 at 19:38
Would you please edit and clarify about the CI tool you're using? What is it, how does it operate? If you can rundotnet restore
via it, why can't you do the same withsudo dotnet restore
even without it having root permissions?
â dessert
Apr 25 at 6:39
add a comment |Â
1
Comments are not for extended discussion; this conversation has been moved to chat.
â Thomas Wardâ¦
Apr 24 at 19:38
Would you please edit and clarify about the CI tool you're using? What is it, how does it operate? If you can rundotnet restore
via it, why can't you do the same withsudo dotnet restore
even without it having root permissions?
â dessert
Apr 25 at 6:39
1
1
Comments are not for extended discussion; this conversation has been moved to chat.
â Thomas Wardâ¦
Apr 24 at 19:38
Comments are not for extended discussion; this conversation has been moved to chat.
â Thomas Wardâ¦
Apr 24 at 19:38
Would you please edit and clarify about the CI tool you're using? What is it, how does it operate? If you can run
dotnet restore
via it, why can't you do the same with sudo dotnet restore
even without it having root permissions?â dessert
Apr 25 at 6:39
Would you please edit and clarify about the CI tool you're using? What is it, how does it operate? If you can run
dotnet restore
via it, why can't you do the same with sudo dotnet restore
even without it having root permissions?â dessert
Apr 25 at 6:39
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027592%2fhow-can-i-run-dotnet-on-ubuntu-without-using-sudo%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Comments are not for extended discussion; this conversation has been moved to chat.
â Thomas Wardâ¦
Apr 24 at 19:38
Would you please edit and clarify about the CI tool you're using? What is it, how does it operate? If you can run
dotnet restore
via it, why can't you do the same withsudo dotnet restore
even without it having root permissions?â dessert
Apr 25 at 6:39