enter image description here
I was trying to run tomcat and I think these red files are causing problems.
does anyone know why I cant read .jar files?
Do a sudo ls -la in the same directory to check for permissions of these files.
Maybe you don't have proper read permissions for those files in red. To give read access use command like this sudo chmod ug+r bootstrap.jar. To give write access too sudo chmod ug+rw bootstrap.jar
Related
UPDATE:
I moved my question to ask ubuntu community, but can not delete it from here... if you have an awenser, please share it on ubuntu community not here... Thanks
i want to make an change on a file but i cant do that because i have not correct permissions:
➜ ls -l pycharm64.vmoptions
-rw-r--r-- 1 root root 427 Dec 28 18:33 pycharm64.vmoptions
i tried to change permisions by these two command:
sudo chmod a+w pycharm64.vmoptions
and
sudo chown user:user pycharm64.vmoptions
but in i get an erro both time:
Read-only file system
how can i make an change on my file? (honestly i dont care about the owner and groups of the file... i just want to change my file anyway)
P.S: my OS is UBUNTU
You can change a file on read only by setting the "immutable property"
chattr +i [fileName]
If you want to revert it just change the "+" for a "-"
chattr -i [fileName]
Your filesystem could be mounted as read only. You have to change first before you can write anything to it. Changing file permissions also requires writing on the filesystem.
You may be able to mount it as read write with command like:
sudo mount -o remount,rw /dev/foo /mount/destination/dir
In this command you spesify that you want to remount the filesystem with different options, adding the readwrite, rw capability.
If you successd in changing the filesystem to read write, then you should be able to change to file permissions with the commands you tried earlier.
You can`t edit it directly (I'm not sure about Windows).
You should edit custom settings file instead:
Manually
nano ~/.config/JetBrains/PyCharm2022.3/pycharm64.vmoptions
or from IDE -- https://intellij-support.jetbrains.com/hc/en-us/articles/206544869.
I am new to linux. I have a build.sh file which consists of a lot of mkdir commands and some rm commands. But as I have installed this new in my VB, each time I run the .sh file, it says "Permission Denied for creating directory" and fails.
So is there any way that I grant directory privileges to all users.
Can anyone help me with this
Add "sudo" in the beginning of the directory creation command i.e
sudo mkdir dir_name
The issue might be with the directory in which the mkdir command is being run.
Use the command ll or ls -l to check the directory permissions.
If your directory doesn't have write privilege for the current user, you can run
chmod -R u+w /path/to/directory
This might require you to use sudo if permission is denied.
If you want to enable it for all users, run
chmod -R ugo+w /path/to/directory
Alternatively, a quick fix would be to run the build.sh file as root
sudo /path/to/build.sh
However, this approach is not advised unless you always run it as root
In my application, I need to write a file.json in /myserver/home/www/var/myApplicationFolder/file.json but it does not work. (there is no problem in the code as it has already been tested)
I think it because of the root permission .
What should I do?
If you'd like any account on the server to be able to write to this folder then run:
sudo chmod 777 /myserver/home/www/var/myApplicationFolder/
or if you'd just like it to be able to write to that specific file:
sudo chmod 777 /myserver/home/www/var/myApplicationFolder/file.json
The chmod command takes 3 numbers which correspond to the permissions that the owner, people in the group, and everyone else gets respectively. The issue with the older answer was that they where giving the owner all the permissions (the first 7), but no giving any permissions to anyone else (the second and third 5).
In the terminal run the command:
sudo chmod 755 /myserver/home/www/var/myApplicationFolder/
it should work.
I would like to upload my logo image to the website. To upload it to the Linux server from my computer, i created a directory "media" in the /var/www/html and tried this command:
scp /Users/kateryna/Desktop/my_site/pics/Logo.png root#95.142.160.135:/var/www/html/media
After this I entered the password to the server and then nothing happened, I got an error:
/Users/kateryna/Desktop/my_site/pics/Logo.png: No such file or
directory
.... even though the file exists on my machine.
Why does it happen? maybe I need to give some sort of permission? I read in one of the articles that to allow an upload, my folder permissions must be set to 777 with the command sudo chmod 777 /path/to/upload/folder... tried that for a different directory and didnt work either:
root#production-381d063e:~/new/myMedia# sudo chmod 777 /root/new/myMedia
-bash: sudo: command not found
root#production-381d063e:~/new/myMedia# chmod 777 /root/new/myMedia
root#production-381d063e:~/new/myMedia# scp /Users/kateryna/Desktop/my_site/pics/Logo.png root#95.142.160.135:/root/new/myMedia
root#95.142.160.135's password:
/Users/kateryna/Desktop/my_site/pics/Logo.png: No such file or directory
root#production-381d063e:~/new/myMedia#
Thanks so much!!!!!
I keep trying to move files from a directory on Linux- but I keep getting permission errors.
Initially I was told
sudo chmod -R r+w /directory/*
But this only applies it to the directory folder (and not the files inside)
Trick is- you need to "select all" to apply the file permissions to:
sudo chmod -R a+rwx,go-w /directory/
And that's it
Or you could do sudo chmod 777 /dir/
and that's just a simple way to do the answer stated above.