Installing software to /usr/opt/ - needs permission to run the software?
I'm trying to manually update chromium with Chromium Updater.
It gives me a chrome-linux.zip.
You can extract that, then run /.chrome to run it, it runs fine.
Now the question is - where do I install it?
This question suggests using either /usr/opt or /usr/local.
So I can move the folder there using sudo.
Now to run the software I need to use sudo, other wise I get permission denied.
This seems like the wrong way to be doing things. You shouldn't have to be a superuser to run the software.
installation permissions chromium
add a comment |
I'm trying to manually update chromium with Chromium Updater.
It gives me a chrome-linux.zip.
You can extract that, then run /.chrome to run it, it runs fine.
Now the question is - where do I install it?
This question suggests using either /usr/opt or /usr/local.
So I can move the folder there using sudo.
Now to run the software I need to use sudo, other wise I get permission denied.
This seems like the wrong way to be doing things. You shouldn't have to be a superuser to run the software.
installation permissions chromium
Simplest solution issudo chown -R <user> <directory>, where <user> is your username and <directory> is the chromium directory. The proper way to do it would be to assign the correct permissions - I would say 755, but I don't know if chromium needs write permissions.
– user55325
Nov 15 '12 at 5:39
@user55325 - so I gosudo chown -R dave /usr/opt/bin/chrome-linux/chromeit accepts that./usr/opt/bin/chrome-linux/chrome- permission denied.sudo /usr/opt/bin/chrome-linux/chromewill work - but will give me a pop error saying 'can't run as root'.
– user1068446
Nov 16 '12 at 10:07
google "how list all files in package on MYDISTRO" - that is where your browser is installed, unless you installed it manually.
– Ярослав Рахматуллин
Nov 16 '12 at 20:07
add a comment |
I'm trying to manually update chromium with Chromium Updater.
It gives me a chrome-linux.zip.
You can extract that, then run /.chrome to run it, it runs fine.
Now the question is - where do I install it?
This question suggests using either /usr/opt or /usr/local.
So I can move the folder there using sudo.
Now to run the software I need to use sudo, other wise I get permission denied.
This seems like the wrong way to be doing things. You shouldn't have to be a superuser to run the software.
installation permissions chromium
I'm trying to manually update chromium with Chromium Updater.
It gives me a chrome-linux.zip.
You can extract that, then run /.chrome to run it, it runs fine.
Now the question is - where do I install it?
This question suggests using either /usr/opt or /usr/local.
So I can move the folder there using sudo.
Now to run the software I need to use sudo, other wise I get permission denied.
This seems like the wrong way to be doing things. You shouldn't have to be a superuser to run the software.
installation permissions chromium
installation permissions chromium
edited Mar 20 '17 at 10:16
Community♦
1
1
asked Nov 15 '12 at 2:35
user1068446user1068446
358112144
358112144
Simplest solution issudo chown -R <user> <directory>, where <user> is your username and <directory> is the chromium directory. The proper way to do it would be to assign the correct permissions - I would say 755, but I don't know if chromium needs write permissions.
– user55325
Nov 15 '12 at 5:39
@user55325 - so I gosudo chown -R dave /usr/opt/bin/chrome-linux/chromeit accepts that./usr/opt/bin/chrome-linux/chrome- permission denied.sudo /usr/opt/bin/chrome-linux/chromewill work - but will give me a pop error saying 'can't run as root'.
– user1068446
Nov 16 '12 at 10:07
google "how list all files in package on MYDISTRO" - that is where your browser is installed, unless you installed it manually.
– Ярослав Рахматуллин
Nov 16 '12 at 20:07
add a comment |
Simplest solution issudo chown -R <user> <directory>, where <user> is your username and <directory> is the chromium directory. The proper way to do it would be to assign the correct permissions - I would say 755, but I don't know if chromium needs write permissions.
– user55325
Nov 15 '12 at 5:39
@user55325 - so I gosudo chown -R dave /usr/opt/bin/chrome-linux/chromeit accepts that./usr/opt/bin/chrome-linux/chrome- permission denied.sudo /usr/opt/bin/chrome-linux/chromewill work - but will give me a pop error saying 'can't run as root'.
– user1068446
Nov 16 '12 at 10:07
google "how list all files in package on MYDISTRO" - that is where your browser is installed, unless you installed it manually.
– Ярослав Рахматуллин
Nov 16 '12 at 20:07
Simplest solution is
sudo chown -R <user> <directory>, where <user> is your username and <directory> is the chromium directory. The proper way to do it would be to assign the correct permissions - I would say 755, but I don't know if chromium needs write permissions.– user55325
Nov 15 '12 at 5:39
Simplest solution is
sudo chown -R <user> <directory>, where <user> is your username and <directory> is the chromium directory. The proper way to do it would be to assign the correct permissions - I would say 755, but I don't know if chromium needs write permissions.– user55325
Nov 15 '12 at 5:39
@user55325 - so I go
sudo chown -R dave /usr/opt/bin/chrome-linux/chrome it accepts that. /usr/opt/bin/chrome-linux/chrome - permission denied. sudo /usr/opt/bin/chrome-linux/chrome will work - but will give me a pop error saying 'can't run as root'.– user1068446
Nov 16 '12 at 10:07
@user55325 - so I go
sudo chown -R dave /usr/opt/bin/chrome-linux/chrome it accepts that. /usr/opt/bin/chrome-linux/chrome - permission denied. sudo /usr/opt/bin/chrome-linux/chrome will work - but will give me a pop error saying 'can't run as root'.– user1068446
Nov 16 '12 at 10:07
google "how list all files in package on MYDISTRO" - that is where your browser is installed, unless you installed it manually.
– Ярослав Рахматуллин
Nov 16 '12 at 20:07
google "how list all files in package on MYDISTRO" - that is where your browser is installed, unless you installed it manually.
– Ярослав Рахматуллин
Nov 16 '12 at 20:07
add a comment |
1 Answer
1
active
oldest
votes
If possible, stick to your distro's package management facilities such as apt, yum, portage.
Otherwise, make sure that the installed binaries are executable by your target audience:
chmod 755 /opt/bin/chrome # this will do the trick.
adjust the path of the binary as needed.
Also I think you should consult the documentation of the installer because setting correct permissions is one of its responsibilities. I'm willing to bet Google didn't screw this one up (but you may never know).
Update
The easiest way to upgrade your chrome is to download and extract the updater archive to a temporary location and then to copy the files over to the installation folder. The installation folder will vary depending on where the user installed the browser manually or where the distro's package put it. On Gentoo, Chrome lives in /opt/google/chrome. I sucessufully upgraded my copy of chrome from version 21 to 25 using the following commands:
cd /tmp
wget http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/168203/chrome-linux.zip
unzip chrome-linux.zip
rsync -rEp chrome-linux/ /opt/google/chrome/
rm chrome-linux.zip
This method assumes that a working copy of chrome is installed and copies all files in the update folder while preserving the permissions executability in the original folder. I suggest you use your package manager to re-install chrome before doing the above as root.
Here is what I see in the about dialog, prior to and after the above steps:


There is no installer. It's a zipped folder with an executable /.chrome.
– user1068446
Nov 15 '12 at 6:19
so put it where it belongs and make it executable. google file permissions unix orman chmod.
– Ярослав Рахматуллин
Nov 15 '12 at 6:23
sudo /usr/opt/bin/chrome-linux/chromewill run the program but then gives me a 'cannot run as root' error.sudo chmod 755 /usr/opt/bin/chrome-linux/chrome- works. No message displayed. now/usr/opt/bin/chrome-linux/chrome- Permission denied.
– user1068446
Nov 16 '12 at 10:02
It usually means that you cannot read some file. When you post an error message, you should include what generated it (copy - paste). It may be the case that the folders where the file is are not readable by your regular user. Try chmod 755 on /usr/opt/chrome-linux
– Ярослав Рахматуллин
Nov 16 '12 at 13:02
^Same problem.bash: /usr/opt/bin/chrome-linux/chrome: Permission denied
– user1068446
Nov 16 '12 at 18:25
|
show 1 more comment
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f505870%2finstalling-software-to-usr-opt-needs-permission-to-run-the-software%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If possible, stick to your distro's package management facilities such as apt, yum, portage.
Otherwise, make sure that the installed binaries are executable by your target audience:
chmod 755 /opt/bin/chrome # this will do the trick.
adjust the path of the binary as needed.
Also I think you should consult the documentation of the installer because setting correct permissions is one of its responsibilities. I'm willing to bet Google didn't screw this one up (but you may never know).
Update
The easiest way to upgrade your chrome is to download and extract the updater archive to a temporary location and then to copy the files over to the installation folder. The installation folder will vary depending on where the user installed the browser manually or where the distro's package put it. On Gentoo, Chrome lives in /opt/google/chrome. I sucessufully upgraded my copy of chrome from version 21 to 25 using the following commands:
cd /tmp
wget http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/168203/chrome-linux.zip
unzip chrome-linux.zip
rsync -rEp chrome-linux/ /opt/google/chrome/
rm chrome-linux.zip
This method assumes that a working copy of chrome is installed and copies all files in the update folder while preserving the permissions executability in the original folder. I suggest you use your package manager to re-install chrome before doing the above as root.
Here is what I see in the about dialog, prior to and after the above steps:


There is no installer. It's a zipped folder with an executable /.chrome.
– user1068446
Nov 15 '12 at 6:19
so put it where it belongs and make it executable. google file permissions unix orman chmod.
– Ярослав Рахматуллин
Nov 15 '12 at 6:23
sudo /usr/opt/bin/chrome-linux/chromewill run the program but then gives me a 'cannot run as root' error.sudo chmod 755 /usr/opt/bin/chrome-linux/chrome- works. No message displayed. now/usr/opt/bin/chrome-linux/chrome- Permission denied.
– user1068446
Nov 16 '12 at 10:02
It usually means that you cannot read some file. When you post an error message, you should include what generated it (copy - paste). It may be the case that the folders where the file is are not readable by your regular user. Try chmod 755 on /usr/opt/chrome-linux
– Ярослав Рахматуллин
Nov 16 '12 at 13:02
^Same problem.bash: /usr/opt/bin/chrome-linux/chrome: Permission denied
– user1068446
Nov 16 '12 at 18:25
|
show 1 more comment
If possible, stick to your distro's package management facilities such as apt, yum, portage.
Otherwise, make sure that the installed binaries are executable by your target audience:
chmod 755 /opt/bin/chrome # this will do the trick.
adjust the path of the binary as needed.
Also I think you should consult the documentation of the installer because setting correct permissions is one of its responsibilities. I'm willing to bet Google didn't screw this one up (but you may never know).
Update
The easiest way to upgrade your chrome is to download and extract the updater archive to a temporary location and then to copy the files over to the installation folder. The installation folder will vary depending on where the user installed the browser manually or where the distro's package put it. On Gentoo, Chrome lives in /opt/google/chrome. I sucessufully upgraded my copy of chrome from version 21 to 25 using the following commands:
cd /tmp
wget http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/168203/chrome-linux.zip
unzip chrome-linux.zip
rsync -rEp chrome-linux/ /opt/google/chrome/
rm chrome-linux.zip
This method assumes that a working copy of chrome is installed and copies all files in the update folder while preserving the permissions executability in the original folder. I suggest you use your package manager to re-install chrome before doing the above as root.
Here is what I see in the about dialog, prior to and after the above steps:


There is no installer. It's a zipped folder with an executable /.chrome.
– user1068446
Nov 15 '12 at 6:19
so put it where it belongs and make it executable. google file permissions unix orman chmod.
– Ярослав Рахматуллин
Nov 15 '12 at 6:23
sudo /usr/opt/bin/chrome-linux/chromewill run the program but then gives me a 'cannot run as root' error.sudo chmod 755 /usr/opt/bin/chrome-linux/chrome- works. No message displayed. now/usr/opt/bin/chrome-linux/chrome- Permission denied.
– user1068446
Nov 16 '12 at 10:02
It usually means that you cannot read some file. When you post an error message, you should include what generated it (copy - paste). It may be the case that the folders where the file is are not readable by your regular user. Try chmod 755 on /usr/opt/chrome-linux
– Ярослав Рахматуллин
Nov 16 '12 at 13:02
^Same problem.bash: /usr/opt/bin/chrome-linux/chrome: Permission denied
– user1068446
Nov 16 '12 at 18:25
|
show 1 more comment
If possible, stick to your distro's package management facilities such as apt, yum, portage.
Otherwise, make sure that the installed binaries are executable by your target audience:
chmod 755 /opt/bin/chrome # this will do the trick.
adjust the path of the binary as needed.
Also I think you should consult the documentation of the installer because setting correct permissions is one of its responsibilities. I'm willing to bet Google didn't screw this one up (but you may never know).
Update
The easiest way to upgrade your chrome is to download and extract the updater archive to a temporary location and then to copy the files over to the installation folder. The installation folder will vary depending on where the user installed the browser manually or where the distro's package put it. On Gentoo, Chrome lives in /opt/google/chrome. I sucessufully upgraded my copy of chrome from version 21 to 25 using the following commands:
cd /tmp
wget http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/168203/chrome-linux.zip
unzip chrome-linux.zip
rsync -rEp chrome-linux/ /opt/google/chrome/
rm chrome-linux.zip
This method assumes that a working copy of chrome is installed and copies all files in the update folder while preserving the permissions executability in the original folder. I suggest you use your package manager to re-install chrome before doing the above as root.
Here is what I see in the about dialog, prior to and after the above steps:


If possible, stick to your distro's package management facilities such as apt, yum, portage.
Otherwise, make sure that the installed binaries are executable by your target audience:
chmod 755 /opt/bin/chrome # this will do the trick.
adjust the path of the binary as needed.
Also I think you should consult the documentation of the installer because setting correct permissions is one of its responsibilities. I'm willing to bet Google didn't screw this one up (but you may never know).
Update
The easiest way to upgrade your chrome is to download and extract the updater archive to a temporary location and then to copy the files over to the installation folder. The installation folder will vary depending on where the user installed the browser manually or where the distro's package put it. On Gentoo, Chrome lives in /opt/google/chrome. I sucessufully upgraded my copy of chrome from version 21 to 25 using the following commands:
cd /tmp
wget http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/168203/chrome-linux.zip
unzip chrome-linux.zip
rsync -rEp chrome-linux/ /opt/google/chrome/
rm chrome-linux.zip
This method assumes that a working copy of chrome is installed and copies all files in the update folder while preserving the permissions executability in the original folder. I suggest you use your package manager to re-install chrome before doing the above as root.
Here is what I see in the about dialog, prior to and after the above steps:


edited Nov 16 '12 at 19:53
answered Nov 15 '12 at 6:02
Ярослав РахматуллинЯрослав Рахматуллин
8,27032965
8,27032965
There is no installer. It's a zipped folder with an executable /.chrome.
– user1068446
Nov 15 '12 at 6:19
so put it where it belongs and make it executable. google file permissions unix orman chmod.
– Ярослав Рахматуллин
Nov 15 '12 at 6:23
sudo /usr/opt/bin/chrome-linux/chromewill run the program but then gives me a 'cannot run as root' error.sudo chmod 755 /usr/opt/bin/chrome-linux/chrome- works. No message displayed. now/usr/opt/bin/chrome-linux/chrome- Permission denied.
– user1068446
Nov 16 '12 at 10:02
It usually means that you cannot read some file. When you post an error message, you should include what generated it (copy - paste). It may be the case that the folders where the file is are not readable by your regular user. Try chmod 755 on /usr/opt/chrome-linux
– Ярослав Рахматуллин
Nov 16 '12 at 13:02
^Same problem.bash: /usr/opt/bin/chrome-linux/chrome: Permission denied
– user1068446
Nov 16 '12 at 18:25
|
show 1 more comment
There is no installer. It's a zipped folder with an executable /.chrome.
– user1068446
Nov 15 '12 at 6:19
so put it where it belongs and make it executable. google file permissions unix orman chmod.
– Ярослав Рахматуллин
Nov 15 '12 at 6:23
sudo /usr/opt/bin/chrome-linux/chromewill run the program but then gives me a 'cannot run as root' error.sudo chmod 755 /usr/opt/bin/chrome-linux/chrome- works. No message displayed. now/usr/opt/bin/chrome-linux/chrome- Permission denied.
– user1068446
Nov 16 '12 at 10:02
It usually means that you cannot read some file. When you post an error message, you should include what generated it (copy - paste). It may be the case that the folders where the file is are not readable by your regular user. Try chmod 755 on /usr/opt/chrome-linux
– Ярослав Рахматуллин
Nov 16 '12 at 13:02
^Same problem.bash: /usr/opt/bin/chrome-linux/chrome: Permission denied
– user1068446
Nov 16 '12 at 18:25
There is no installer. It's a zipped folder with an executable /.chrome.
– user1068446
Nov 15 '12 at 6:19
There is no installer. It's a zipped folder with an executable /.chrome.
– user1068446
Nov 15 '12 at 6:19
so put it where it belongs and make it executable. google file permissions unix or
man chmod.– Ярослав Рахматуллин
Nov 15 '12 at 6:23
so put it where it belongs and make it executable. google file permissions unix or
man chmod.– Ярослав Рахматуллин
Nov 15 '12 at 6:23
sudo /usr/opt/bin/chrome-linux/chrome will run the program but then gives me a 'cannot run as root' error. sudo chmod 755 /usr/opt/bin/chrome-linux/chrome - works. No message displayed. now /usr/opt/bin/chrome-linux/chrome - Permission denied.– user1068446
Nov 16 '12 at 10:02
sudo /usr/opt/bin/chrome-linux/chrome will run the program but then gives me a 'cannot run as root' error. sudo chmod 755 /usr/opt/bin/chrome-linux/chrome - works. No message displayed. now /usr/opt/bin/chrome-linux/chrome - Permission denied.– user1068446
Nov 16 '12 at 10:02
It usually means that you cannot read some file. When you post an error message, you should include what generated it (copy - paste). It may be the case that the folders where the file is are not readable by your regular user. Try chmod 755 on /usr/opt/chrome-linux
– Ярослав Рахматуллин
Nov 16 '12 at 13:02
It usually means that you cannot read some file. When you post an error message, you should include what generated it (copy - paste). It may be the case that the folders where the file is are not readable by your regular user. Try chmod 755 on /usr/opt/chrome-linux
– Ярослав Рахматуллин
Nov 16 '12 at 13:02
^Same problem.
bash: /usr/opt/bin/chrome-linux/chrome: Permission denied – user1068446
Nov 16 '12 at 18:25
^Same problem.
bash: /usr/opt/bin/chrome-linux/chrome: Permission denied – user1068446
Nov 16 '12 at 18:25
|
show 1 more comment
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f505870%2finstalling-software-to-usr-opt-needs-permission-to-run-the-software%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Simplest solution is
sudo chown -R <user> <directory>, where <user> is your username and <directory> is the chromium directory. The proper way to do it would be to assign the correct permissions - I would say 755, but I don't know if chromium needs write permissions.– user55325
Nov 15 '12 at 5:39
@user55325 - so I go
sudo chown -R dave /usr/opt/bin/chrome-linux/chromeit accepts that./usr/opt/bin/chrome-linux/chrome- permission denied.sudo /usr/opt/bin/chrome-linux/chromewill work - but will give me a pop error saying 'can't run as root'.– user1068446
Nov 16 '12 at 10:07
google "how list all files in package on MYDISTRO" - that is where your browser is installed, unless you installed it manually.
– Ярослав Рахматуллин
Nov 16 '12 at 20:07