LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-28-2020, 05:09 AM   #1
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Rep: Reputation: Disabled
Problem with installing cheat program.


The program cheat allows you to create and view interactive cheatsheets on the command-line.
I downloaded and placed the executable file cheat-linux-amd64 in /usr/local/bin.
I then made it executable with: sudo chmod +x cheat-linux-amd64
I then typed in the command:
Quote:
sudo mkdir -p ~/.config/cheat && cheat --init > /.config/cheat/conf.yml
The result is:
bash: /home/porter/.config/cheat/config.yml - Permission denied.

What is the reason of this error message?

Installation instructions for cheat: https://github.com/cheat/cheat

Last edited by validator456; 01-28-2020 at 05:17 AM.
 
Old 01-28-2020, 05:14 AM   #2
Geist
Member
 
Registered: Jul 2013
Distribution: Slackware 14 / current
Posts: 442

Rep: Reputation: 196Reputation: 196
You forgot the tilde in the last path.
/.config/cheat/conf.yml

/ = Filesystem root, which you probably don't have write permissions for, but the folder probably doesn't even exist at that spot, to begin with.
 
Old 01-28-2020, 05:23 AM   #3
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
I copied the command
Quote:
sudo mkdir -p ~/.config/cheat && cheat --init > ~/.config/cheat/conf.yml
from this page: https://github.com/cheat/cheat

I don't know why the tilde disappeared. I tried it again. With the tilde, and I get the same error.
 
Old 01-28-2020, 05:31 AM   #4
Geist
Member
 
Registered: Jul 2013
Distribution: Slackware 14 / current
Posts: 442

Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by validator456 View Post
I copied the command


from this page: https://github.com/cheat/cheat

I don't know why the tilde disappeared. I tried it again. With the tilde, and I get the same error.
Ohh, if you didn't install it through your package manager then you also quite likely need to give the file the executable flag.
Modify the path here to reflect where cheat is on your system.

Code:
chmod +x  /location/of/cheat
Edit: Sorry, misplaced whitespace.

Last edited by Geist; 01-28-2020 at 05:41 AM.
 
Old 01-28-2020, 05:56 AM   #5
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
I did that. See first post.
 
Old 01-28-2020, 06:43 AM   #6
linom
Member
 
Registered: May 2015
Location: India
Distribution: Debian, CentOS,Redhat, Fedora, Ubuntu
Posts: 91

Rep: Reputation: 13
Quote:
Originally Posted by validator456 View Post
The program cheat allows you to create and view interactive cheatsheets on the command-line.
I downloaded and placed the executable file cheat-linux-amd64 in /usr/local/bin.
I then made it executable with: sudo chmod +x cheat-linux-amd64
I then typed in the command:


The result is:
bash: /home/porter/.config/cheat/config.yml - Permission denied.

What is the reason of this error message?

Installation instructions for cheat: https://github.com/cheat/cheat
Have you done this:
Quote:
export CHEAT_CONFIG_PATH="~/.dotfiles/cheat/conf.yml"
 
Old 01-28-2020, 10:39 AM   #7
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by validator456 View Post
I then typed in the command:
Code:
sudo mkdir -p ~/.config/cheat && cheat --init > /.config/cheat/conf.yml
The result is:
bash: /home/porter/.config/cheat/config.yml - Permission denied.
The bold part executes as root, thus the resulting directory ~/.config/cheat is owned by root. The italic part is executed as normal user who does not have read/write permission to the previously created directory.
This demonstrates what I mean:
Code:
$ sudo whoami && whoami
root
user
$
Delete the folder created by root and run mkdir and cheat as normal user:
Code:
sudo rm -rf ~/.config/cheat
mkdir -p ~/.config/cheat && cheat --init > /.config/cheat/conf.yml
There is no sudo required in the instructions you linked.

Last edited by crts; 01-29-2020 at 03:34 AM.
 
2 members found this post helpful.
Old 02-07-2020, 01:10 AM   #8
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
Okay, I will check it out, thank you.
 
  


Reply

Tags
cli



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Excellent Utilities: cheat.sh - community driven cheat sheet LXer Syndicated Linux News 0 10-21-2019 02:01 PM
LXer: Cheat.sh Shows Cheat Sheets On The Command Line Or In Your Code Editor LXer Syndicated Linux News 0 07-15-2019 08:24 PM
LXer: Cheat Knoppix 4 to Improve Performance: Part 1. Cheat Code Basics and the ALSA Cheat Code LXer Syndicated Linux News 0 01-10-2006 07:16 AM
browser compatiable guess the number im thinking of cheat Laptop2250 Programming 3 09-15-2004 03:53 AM
Linux command cheat sheet freddieB Linux - General 1 02-22-2002 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration