Results 1 to 7 of 7

Thread: Help understanding file permissions

  1. #1
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,326

    Default Help understanding file permissions

    I have an application and associated files in a directory XXX that runs successfully from a console. But when I created another directory YYY and copied all the files to it, the application runs but the results differ so that it is not usable. When I check the permissions of the files in XXX they are Group "1001" while the files in YYY are Group "user". I haven't been able to change their group either as user or as root.

    Could someone explain why this has happened as a result of a simple copy and how it can be overcome?

    Thanks in advance.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,196
    Blog Entries
    15

    Default Re: Help understanding file permissions

    Quote Originally Posted by ionmich View Post
    I have an application and associated files in a directory XXX that runs successfully from a console. But when I created another directory YYY and copied all the files to it, the application runs but the results differ so that it is not usable. When I check the permissions of the files in XXX they are Group "1001" while the files in YYY are Group "user". I haven't been able to change their group either as user or as root.

    Could someone explain why this has happened as a result of a simple copy and how it can be overcome?

    Thanks in advance.
    Hi
    The group is users not user?

    Sounds like your app changes (or you were a different user) when the copy was performed from the console?

    Check in the files /etc/group and /etc/passwd for user/group 1001

    Was this an updated system?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,326

    Default Re: Help understanding file permissions

    Thank you for the speedy response,

    Quote Originally Posted by malcolmlewis View Post
    Hi
    The group is users not user?
    Confirmed.

    Sounds like your app changes (or you were a different user) when the copy was performed from the console?
    Copy was attempted twice. Once by user ion (1000) with XFCE Thunar and once by root in console. Neither copied the 1001 Group ID.

    Check in the files /etc/group and /etc/passwd for user/group 1001
    /etc/passwd shows...

    guest:x:1001:100:Guest:/home/guest:/bin/bash
    ion:x:1000:100:Ion:/home/ion:/bin/bash

    I am logged in as ion (1000)

    Was this an updated system?
    No.

    So does this mean that only guest can run the application successfully? Or is there a way for root to change the permissions on the file(s)?

    OR, can I delete user guest (1001) in Yast and give user ion (1000) the 1001 id and then copy all the files to directory YYY? But won't that affect any other software?

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,196
    Blog Entries
    15

    Default Re: Help understanding file permissions

    Hi
    Is this a user application in $HOME of the user, or a system application in /usr/bin?

    If it's a user application, you need to copy from Guest to ion and then chown ion:users the directory/files (all as root user).
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,326

    Default Re: Help understanding file permissions

    Thank you for your efforts to resolve this.

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Is this a user application in $HOME of the user, or a system application in /usr/bin?
    wine is in /usr/bin
    VCC.exe is in DATA/TEST
    DATA is in a different partition and is mounted to /home/ion/DATA (might this present a problem?)
    Commands as executed by user ion...

    ion@linux-hdyq:~> cd DATA/TEST
    ion@linux-hdyq:~/DATA/TEST> ls

    bootvcc.dsk coco3.vhd fd502.dll mpi.dll os9.dsk Vcc.ini
    coco3.rom disk11.rom harddisk.dll os9a.dsk VCC.exe

    ion@linux-hdyq:~/DATA/TEST> wine ./VCC.exe

    If it's a user application, you need to copy from Guest to ion and then chown ion:users the directory/files (all as root user).
    I did the above as root. Nothing changed.

    Associated question. I thought root could change all file permissions. So how do I change the group from users to 1001?

  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,196
    Blog Entries
    15

    Default Re: Help understanding file permissions

    Quote Originally Posted by ionmich View Post
    Thank you for your efforts to resolve this.



    wine is in /usr/bin
    VCC.exe is in DATA/TEST
    DATA is in a different partition and is mounted to /home/ion/DATA (might this present a problem?)
    Commands as executed by user ion...

    ion@linux-hdyq:~> cd DATA/TEST
    ion@linux-hdyq:~/DATA/TEST> ls

    bootvcc.dsk coco3.vhd fd502.dll mpi.dll os9.dsk Vcc.ini
    coco3.rom disk11.rom harddisk.dll os9a.dsk VCC.exe

    ion@linux-hdyq:~/DATA/TEST> wine ./VCC.exe



    I did the above as root. Nothing changed.

    Associated question. I thought root could change all file permissions. So how do I change the group from users to 1001?
    Hi
    A better way would be to change the user who is group 1001 to to group users..... Do this via YaST Security and Users, select the User/Group Management (I'm assuming Guest) and in the groups tab change/edit to be part of users group.

    Else you would need to create the foreign group called 1001 and add this to your user(s).

    Also, in the above ls shows nothing, you need to use ls -la to show permissions Need to see that output...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Aug 2008
    Location
    Mexico and Sweden
    Posts
    1,326

    Default Re: Help understanding file permissions

    Thanks for all the effort you put into this. Using "chown ion:1001" I modified all the files so that they duplicate the ones in the original directory. That changed nothing. I have spent a lot of time trying to get this to work and I am giving up now. Leap 42.3 expires in four months and I can live with what I have until I switch to Leap 15.0 and work on it then.

    Sorry I took up your time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •