Bash: /usr/local/bin/flair: access is denied

Hello dear @vasilis!

Recently I’ve got a strange problem (after last flair upgrade). For some reason, I don’t have permission to open flair (see screenshot). It says:

bash: /usr/local/bin/flair: Отказано в доступе

“Отказано в доступе” means access is denied. I found that I don’t have permission to open flair folder and after I changed the rights (it was only accesible from root) everything was ok. Also, I found that icons for .flair and .inp files disappeared, very similar to the Missing flair mime icons topic. Installation is from Ubuntu 20.04 repo.

Thank you in advance!

2020-12-05_18-07

Dear Ivan,

thanks for reporting the issue.

Until it is fixed and a new package is released, you need to change permission to 755 for:

  1. The following scripts in /usr/local/bin folder:
    dcmview, fcalc, flair, fless, fm, pt

  2. Recursively to /usr/local/flair directory:

    sudo chmod -R 755 /usr/local/flair
    

Cheers,
David

Dear Dávid!

Thanks for the solution! But what about icons?

Regards,
Ivan

Hi @vasilis and @horvathd
I got this error with the sudo install option. It worked fine with the installation from source.
Sunil

Dear Ivan,

yes, you need to fix the permission for the icons application-x-flair.png and application-x-fluka.png in the /usr/share/icons/hicolor/48x48/mimetypes directory.

Cheers,
David

Dear Dávid!

The files are still not associated with flair. How to associate .flair files with flair? I mean, I used to be able to click twice on that files and flair opened these files by default.

Regards,
Ivan

Dear Ivan,

maybe you need to restart your window manager or there are some other directories with the wrong permission I don’t know about preventing the correct association.

Until a fix comes out, I would suggest to use the command line or the Load button in Flair to access your simulations.

Cheers,
David

Dear Dávid!

Okay, will wait for this fix!

Best wishes,
Ivan

@Ivan could you please reinstall the package with
sudo apt install --reinstall flair flair-geoviewer

Reinstall does not help. Is there a way to downgrade to 3.1.5?

P.S. OS is linux mint 20

Hello, Vasilis!
This is doesn’t help…

Can you try to make a clean install

  1. First remove sudo apt remove flair flair-geoviewer
  2. Ensure that there is nothing left
    sudo rm -Rf /usr/local/bin/flair /usr/local/flair
  3. and re install
    sudo apt install flair flair-geoviewer

Thanks for suggestions! Already did, still the same…

@Ivan could you send us the output of the following commands

ls -l /
ls -l /usr
ls -l /usr/local
ls -l /usr/local/bin
ls -l /usr/local/flair
dpkg -L flair
dpkg -L flair-geoviewer

@vasilis, please see my logs attached after these commands:

ivan@ivan-PC:~$ ls -l / > log1.txt
ivan@ivan-PC:~$ ls -l /usr > log2.txt
ivan@ivan-PC:~$ ls -l /usr/local > log3.txt
ivan@ivan-PC:~$ ls -l /usr/local/bin > log4.txt
ivan@ivan-PC:~$ ls -l /usr/local/flair > log5.txt
ls: невозможно открыть каталог '/usr/local/flair': Отказано в доступе
ivan@ivan-PC:~$ sudo ls -l /usr/local/flair > log5.txt
[sudo] пароль для ivan: 
ivan@ivan-PC:~$ dpkg -L flair > log6.txt
ivan@ivan-PC:~$ dpkg -L flair-geoviewer > log7.txt

log1.txt (1.7 KB) log2.txt (723 Bytes) log3.txt (538 Bytes) log4.txt (1.8 KB) log5.txt (6.0 KB) log6.txt (40.2 KB) log7.txt (2.1 KB)

Thank you @Ivan . The permissions are not set correctly.
Please execute the commands as @horvathd mentioned

cd /usr/local/bin
sudo chmod 755 flair dcmview fcalc fless fm pt
sudo chmod -R 755 /usr/local/flair

We are looking to correct the permissions in the package, and we will let you know.

Yes, I know that, and did already, it was due to reinstall. I was lazy to set them properly after that again :sweat_smile:

Thank you!

@ivan could you try again to re-install it. The error was coming from the virtual machine used to generate the package, the shared folder for some reason was automounted without the proper file permissions. Now, I forced the proper flags on mount and regenerated the package, which seems to have the correct permissions

I confirm that everything is fine now! Icons are also here.

Huge thanks @vasilis and @horvathd!

Regards,
Ivan