How to get privileged (permissions) access for our app on Ubuntu?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








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?







share|improve this question


















  • 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 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














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?







share|improve this question


















  • 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 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












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?







share|improve this question














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?









share|improve this question













share|improve this question




share|improve this question








edited May 17 at 14:26









Martin Thornton

2,38541730




2,38541730










asked May 17 at 13:54









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 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












  • 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 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







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










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.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    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






























    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.






    share|improve this answer
























      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.






      share|improve this answer






















        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.






        share|improve this answer












        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.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 17 at 14:08









        NeoGeek

        815




        815






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491