I have a CMakeLists.txt that requires certain input files to have write permissions, otherwise the make process fails with a rather obscure "Permission denied Error 126" message. The page here describes the usage, with the key points being:
In order to make this cfg file usable it must be executable, so lets use the following command to make it executable
chmod a+x cfg/Tutorials.cfg
Next we need to add the following lines to our CMakeLists.txt. For Groovy and above
generate_dynamic_reconfigure_options(
cfg/Tutorials.cfg
#...
)
add_dependencies(example_node ${PROJECT_NAME}_gencfg)
How would I alter the above snippet so I could do something sensible if I forget to run chmod on cfg/Tutorials.cfg thus it is not executable?
As described in the key points, you must make the file executable by chmod 0555 but you have to be cautious when doing this. By chmod 0555, even the owner of the file, other than root, is denied write privileges. I recommend using 0775 or something else better as it grants read and write permission.
Related
I can't rely on the umask since my machine does not use umask to set permissions. Is there a way to specify that all sub-directories (and their sub-directories etc) of some root directory all have a certain permission, and similarly, that all sub-files of the same root directory have another type of permission in the %files section of the spec file.
If not, I'll have to run some external bash scrip to get the spec file syntax for each individual file, and copy that output to the %files section of the spec file, which will be highly tedious.
If you look at the various references online, %defattr() takes a lesser-known fourth parameter for directories.
I want to run Valgrind on an executable built by another user on the same system. When I do this, I do not receive line numbers for errors, which nearly defeats the purpose. Instead, I get errors which look like the executable was built without a symbol table, or like I cannot read the files.
Things I have checked:
The running user has read permission on all the source files, and the directories they are in files.
running with sudo -u running_user doesn't work, but, without recompiling, running with root permissions does work.
What permissions does Valgrind need in order to operate? Is this error caused by something other than permissions?
I am having some trouble setting the permissions on an Apache Server (Ubuntu Server 12.04 LTS). I moved the directory to my home directory. I was able to give apache permissions to that directory. But, it didn't apply to the sub directories.
Is there a way to apply permissions to all the subfolders?
I am fairly new to Ubuntu Server and would appreciate the help.
chown -R www-data:www-data /home/
http://en.wikipedia.org/wiki/Chown
Also you can try what #mjgpy3 suggested
I think what you want is:
chmod -R <mode> <root>
This will recursively change permissions from a <root> to every sub directory and file. Be very careful setting the <mode> though. <mode> is an a number between 000 and 777 specifying mode and <root> is the parent of all files/folders that you want to change the permission of.
UPDATE
To specify <mode> you will, as I said above need to provide a 3 digit number, each of which is 0-7 inclusively. Each of these numbers specifies a different group (if you will). The first means current user, the second means a user's group and the third means the rest of the world. Now, the actual numbers themselves specify which privilege their respective group will be granted; this is done in binary. RWE (read, write and execute) are the available permissions on a file.
So, consider the number 5.
5 in binary is 101, this means that 5 specifies R-E, which means read, not execute and write. As you can see a 1 indicates that a privilege is enabled, whereas a 0 means disabled.
So, here are some common uses and what they mean:
chmod 777 file.txt
file.txt is now readable, writeable and executable by everyone who may ever come across the file.
A more used example is:
chmod 755 file.txt
This says that (since 7 is 111 in binary) the owner of the file (that's probably you) can do anything they want with it, I.E RWE, I.E. read, write and execute. Where those who are not the user may only read and execute it.
Here's an external source if my explanation did not make sense to you.
In the diagnostics sections in textpattern, it's giving me the error:
"File directory path is not writable:...html/textpattern/files" (took out beginning of path)
I changed the permissions for the textpattern folder, and the folder named "files", which is in the root folder not in the textpattern folder, but it's still giving the error. Do I need to change permissions for all enclosed items of the textattern folder and not just the folder itself?
Maybe I got you wrong but I suppose you simply have to change the path to the files folder in your admin panel from "…html/textpattern/files" to "…/html/files".
Assuming you're on a *nix system...
It sounds like you want to change the permissions recursively.
A quick fix might be to change the permissions like so:
chmod -R 777 html/textpattern
This command will go through every folder and file and change its permissions (the -R turns on the recursive bit).
Warning, this is very broad and not a good idea for production.
A better approach would be to change the permissions at a finer level of granularity. Google for "Linux file permissions" or type man chown at the shell.
I have found some solutions to this error and tried implementing them but none of which has worked and hope that some here at SO might have a different answer.
I get this error, "Warning! Failed to move file" when I try install modules into my new installation of Joomla here:
http://sun-eng.sixfoot.co.za
Here's some solutions I have tried to no avail:
http://forum.joomla.org/viewtopic.php?f=199&t=223206
http://www.saibharadwaj.com/blog/2008/03/warning-failed-to-move-file-joomla-10x-joomla-15x/
Anyone know of another solution to this please?
Thanks!
Go to Help -> System Info in your administrator backend and check your Directory Permissions tab to make sure everything is writable.
Also make sure your Path to Temp Folder is correct in Site -> Global Configuration.
Finally, check to make sure that the module isn't already installed. It's possible that some files already got copied or something and now your system is having problems overwriting them.
If none of this works, let us know if the error message specifies which file can't be moved. That would help figure out a solution.
In the configuration folder change the temporal folder location to /tmp (public $tmp_path = '/tmp';) or create your own temperate folder and set it to /myowntemp and change the file permission to 777. you are good to go .
This is typically a file permissions issue. If the system cannot write to the tmp directory within Joomla it will give you the "Warning Failed To Move File" error.
The typical solution is to make the directory wide-open, in general a bad practice but a quick fix. You log in to the Linux command line via a terminal (telnet or ssh) session and set the permissions of the directory.
# chmod -R 777 ./tmp
The better option is to find out what user/group the Apache server is running as and assign the permissions accordingly. For example, if Apache is running your site as the myuser:nobody user:group then you can open up write permissions for the group by changing ownership of the tmp folder and making it writable by anyone in the group:
# chgrp -R nobody ./tmp
# chmod -R 775 ./tmp
Security can be a pain to get set correctly if you don't know *nix commands and security settings, so most people just blast a huge hole in the security with chmod 777.
The next thing you'll probably run into is another error message about not being able to update a specific directory. Again, this is a permissions issue and is typically a piece of the file being unzipped into the administrator subdirectory. Depending on whether your installing a component, a module, or a complex plugin with multiple pieces you may need to open up one or more of these directories using the same approach as above. Here is the "blow a big open hole in security" method:
# chmod -R 777 ./administrator/
Or more selectively:
# chmod -R 777 ./administrator/components/
# chmod -R 777 ./administrator/modules/
If you are a linux user then it is very simple to solve. Just type the following command and try again to install plugin/entension.
sudo chmod -R 777 /var/www/html/my_joomla_folder
You can also refer this link for brief information regarding permission of each folder and file.
Cheers!!
In Joomla 3.x you should go to System->System Information to see directory permissions
If one or more directories that are listed are not "writable" then you should change the permission of those directories:
If you are using one of Linux distributions you can use this command
to give the directories read/write/execute permission:
sudo chmod 777 -R address_of_lampp_directory/lampp/htdocs/joomla_directory
I have had a similar issue today and found is was the permissions set on the 'temp folder'. To resolve I changed them to 777 and my plugin installs worked fine!!
Another thing to check is whether you actually have space on the disk. I had this error and discovered that the drive was 100% full. Removing some unused files fixed the problem.
One other thing to try if everything else is not working is to add the following to your .htaccess file:
php_value upload_max_filesize 10M
Make sure 10M covers the size of the file you are uploading - increase it if your file is 12Mb, for instance.
[Source]
This issue was solved like this.
On the configuration.php file change the tmp_path variable according to:
if you site is mysite.azurewebsites.net, the path should looks like
'C:\DWASFiles\Sites\mysite\VirtualDirectory0\site\wwwroot\tmp'
instead of
'C:\DWASFiles\Sites\mysite.azurewebsites.net\VirtualDirectory0\site\wwwroot\tmp'
Refer to the link: http://social.msdn.microsoft.com/Forums/en-US/windowsazurewebsitespreview/thread/2701eadc-9977-46ab-9c56-81a2234bdce4
I did it and every is working for every error problem with OSX, I use OSX version 10.9.2 and get many problems. The way to fix every error is
# cd /Applications
# chmod -R 777 ./XAMPP
some files might not change permission but the problem is gone.
you can create folder and upload fine and picture, including install plugin.