How to get privileged (permissions) access for our app on Ubuntu?
![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
-1
down vote
favorite
I'm a developer and new to Linux. I coded a Jframe Java program which performs File (create, delete, read, write, mkdir) operations. It works fine on windows, but not Linux.
My program does not have permission to read and write files or to create directories.
How do I give permissions to our own developed program on Linux?
permissions java
add a comment |Â
up vote
-1
down vote
favorite
I'm a developer and new to Linux. I coded a Jframe Java program which performs File (create, delete, read, write, mkdir) operations. It works fine on windows, but not Linux.
My program does not have permission to read and write files or to create directories.
How do I give permissions to our own developed program on Linux?
permissions java
2
sudo filename or sudo ./filename
â Yoran Jansen
May 17 at 13:57
2
Create files/directories where exactly? Your app has the permissions of the user it's running as.
â dobey
May 17 at 14:43
1
To thesudo
enthusiasts: I wouldn't so easily suggest thesudo
sledgehammer and let the program run with root permissions. If the program is faulty (as all newly written programs tend to be), then it can live up its faultiness with the full impact of root user's privileges. Bad idea.
â PerlDuck
May 17 at 14:50
add a comment |Â
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I'm a developer and new to Linux. I coded a Jframe Java program which performs File (create, delete, read, write, mkdir) operations. It works fine on windows, but not Linux.
My program does not have permission to read and write files or to create directories.
How do I give permissions to our own developed program on Linux?
permissions java
I'm a developer and new to Linux. I coded a Jframe Java program which performs File (create, delete, read, write, mkdir) operations. It works fine on windows, but not Linux.
My program does not have permission to read and write files or to create directories.
How do I give permissions to our own developed program on Linux?
permissions java
edited May 17 at 14:26
Martin Thornton
2,38541730
2,38541730
asked May 17 at 13:54
![](https://lh4.googleusercontent.com/-tURUzIsB5b8/AAAAAAAAAAI/AAAAAAAAABQ/k6kwLcfhEzw/photo.jpg?sz=32)
![](https://lh4.googleusercontent.com/-tURUzIsB5b8/AAAAAAAAAAI/AAAAAAAAABQ/k6kwLcfhEzw/photo.jpg?sz=32)
Dinesh Kumar
1
1
2
sudo filename or sudo ./filename
â Yoran Jansen
May 17 at 13:57
2
Create files/directories where exactly? Your app has the permissions of the user it's running as.
â dobey
May 17 at 14:43
1
To thesudo
enthusiasts: I wouldn't so easily suggest thesudo
sledgehammer and let the program run with root permissions. If the program is faulty (as all newly written programs tend to be), then it can live up its faultiness with the full impact of root user's privileges. Bad idea.
â PerlDuck
May 17 at 14:50
add a comment |Â
2
sudo filename or sudo ./filename
â Yoran Jansen
May 17 at 13:57
2
Create files/directories where exactly? Your app has the permissions of the user it's running as.
â dobey
May 17 at 14:43
1
To thesudo
enthusiasts: I wouldn't so easily suggest thesudo
sledgehammer and let the program run with root permissions. If the program is faulty (as all newly written programs tend to be), then it can live up its faultiness with the full impact of root user's privileges. Bad idea.
â PerlDuck
May 17 at 14:50
2
2
sudo filename or sudo ./filename
â Yoran Jansen
May 17 at 13:57
sudo filename or sudo ./filename
â Yoran Jansen
May 17 at 13:57
2
2
Create files/directories where exactly? Your app has the permissions of the user it's running as.
â dobey
May 17 at 14:43
Create files/directories where exactly? Your app has the permissions of the user it's running as.
â dobey
May 17 at 14:43
1
1
To the
sudo
enthusiasts: I wouldn't so easily suggest the sudo
sledgehammer and let the program run with root permissions. If the program is faulty (as all newly written programs tend to be), then it can live up its faultiness with the full impact of root user's privileges. Bad idea.â PerlDuck
May 17 at 14:50
To the
sudo
enthusiasts: I wouldn't so easily suggest the sudo
sledgehammer and let the program run with root permissions. If the program is faulty (as all newly written programs tend to be), then it can live up its faultiness with the full impact of root user's privileges. Bad idea.â PerlDuck
May 17 at 14:50
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
Correct answer: Linux permissions are not a binary on or off... I'd recommend starting by learning a bit about how they work. A good place to start would be Introduction to linux permissions. Once you have reviewed that, you'll know that the user running the application determines what permissions the application has. So if you want the application to have more permissions, you'll need to have it run by a user with those permissions.
Short answer: You can give the application root user permissions by calling sudo application
so let's say you application was notepad
, from a terminal window, you'd type sudo notepad
and the application would have permissions to read/right files where ever root has permissions, which is pretty much everywhere.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
Correct answer: Linux permissions are not a binary on or off... I'd recommend starting by learning a bit about how they work. A good place to start would be Introduction to linux permissions. Once you have reviewed that, you'll know that the user running the application determines what permissions the application has. So if you want the application to have more permissions, you'll need to have it run by a user with those permissions.
Short answer: You can give the application root user permissions by calling sudo application
so let's say you application was notepad
, from a terminal window, you'd type sudo notepad
and the application would have permissions to read/right files where ever root has permissions, which is pretty much everywhere.
add a comment |Â
up vote
4
down vote
Correct answer: Linux permissions are not a binary on or off... I'd recommend starting by learning a bit about how they work. A good place to start would be Introduction to linux permissions. Once you have reviewed that, you'll know that the user running the application determines what permissions the application has. So if you want the application to have more permissions, you'll need to have it run by a user with those permissions.
Short answer: You can give the application root user permissions by calling sudo application
so let's say you application was notepad
, from a terminal window, you'd type sudo notepad
and the application would have permissions to read/right files where ever root has permissions, which is pretty much everywhere.
add a comment |Â
up vote
4
down vote
up vote
4
down vote
Correct answer: Linux permissions are not a binary on or off... I'd recommend starting by learning a bit about how they work. A good place to start would be Introduction to linux permissions. Once you have reviewed that, you'll know that the user running the application determines what permissions the application has. So if you want the application to have more permissions, you'll need to have it run by a user with those permissions.
Short answer: You can give the application root user permissions by calling sudo application
so let's say you application was notepad
, from a terminal window, you'd type sudo notepad
and the application would have permissions to read/right files where ever root has permissions, which is pretty much everywhere.
Correct answer: Linux permissions are not a binary on or off... I'd recommend starting by learning a bit about how they work. A good place to start would be Introduction to linux permissions. Once you have reviewed that, you'll know that the user running the application determines what permissions the application has. So if you want the application to have more permissions, you'll need to have it run by a user with those permissions.
Short answer: You can give the application root user permissions by calling sudo application
so let's say you application was notepad
, from a terminal window, you'd type sudo notepad
and the application would have permissions to read/right files where ever root has permissions, which is pretty much everywhere.
answered May 17 at 14:08
![](https://i.stack.imgur.com/yUegY.png?s=32&g=1)
![](https://i.stack.imgur.com/yUegY.png?s=32&g=1)
NeoGeek
815
815
add a comment |Â
add a comment |Â
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%2f1037423%2fhow-to-get-privileged-permissions-access-for-our-app-on-ubuntu%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
2
sudo filename or sudo ./filename
â Yoran Jansen
May 17 at 13:57
2
Create files/directories where exactly? Your app has the permissions of the user it's running as.
â dobey
May 17 at 14:43
1
To the
sudo
enthusiasts: I wouldn't so easily suggest thesudo
sledgehammer and let the program run with root permissions. If the program is faulty (as all newly written programs tend to be), then it can live up its faultiness with the full impact of root user's privileges. Bad idea.â PerlDuck
May 17 at 14:50