Tag Info

New answers tagged

1

This is a bit kludgy, but – write a C program that looks like this: #include <stdio.h> #include <stdlib.h> ︙ FILE *sh; sh = popen("/bin/sh", "w"); // Use "/bin/bash" if you need to. if (sh == (FILE *)NULL) { perror("popen"); exit(1); } ...


2

You can use sudo for that. You can allow your users to sudo your script and only that script. Step by step: Create system "executor_account" account (you can use any name) and give it permissions to your script. Don't use root account for that. Configure sudo. You have to learn how to use sudo and allow your users to make "sudo executor_account ...


1

No, it's not possible with Linux file permissions. Users must be able to read the shell script in order to execute it - and that means they can make a copy, modify it, and run it.


0

It seems you have two problems here. One is a simple matter of user error. The other, I'm afraid, is going to be a bit trickier. You're mounting the wrong partition. The "EFI" partition you are mounting is just a partition to hold the bootloader for systems that use UEFI. This partition will not contain any of your data and generally should not be messed ...


1

Apparently, the problem stems from certain Microsoft 'security features'. Strict Name Checking and Authentication Loopback Check to be specific. These checks block any user from navigating locally to a self-referencing HOSTS entry. This is my own understanding, feel free to correct me if I am wrong. The steps I followed are outlined and explained in ...


0

You want to add these users to the www-data group first. Then the intended method is to use chmod g+s /home/user/vhost. This will set the SGID on this folder meaning that it's group will be used for new files. Unfortunately, this doesn't help for the sub dirs. To keep those up to date you'll need to regularly run this after directory tree modifications: find ...


0

My issue was slightly different: I needed to have a CGI script (well, Mason actually) to access a Dropbox folder with remotely changing info to update pages. But, Apache runs as user _www and is quite restricted. It cannot login, for example. (Don't make it able to login, even though you can!) I setup a new account, group _www, add the new username to group ...


1

Root is granted read and write permissions, as root owns the file. User iam has only read permissions. chown iam /home/iam/.emacs.d/abbrev_defs and it will re-posessed by iam, and thus be accessible with read/write permissions.


0

After much testing and head banging I realized the answer. It is quite simple and makes sense. ...


0

take ownership of the folder/files first then you work operations on same. http://www.faqforge.com/windows/take-ownership-of-a-file-or-folder-by-command-in-windows/


-1

I had exactly the same problem. In the logs I saw it trying to copy something from default profile's local temporary Internet files. Why would default profile have temporary Internet files, I would think it should only have an empty directory? Checked my other Win7Pro 64 bit computer. Nothing there. I removed those files and that fixed the problem. They were ...


0

OK, I found the issue.. Apparently, at least in Windows 8, 8.1 and Windows Server 2008, UAC restricts administrative-privileges requiring changes to local admins by default. The only reason I can imagine for this is that if a Workgroup connected remote machine's logged in user has identical credentials (ID and password) as that of the home computer, the ...


0

You might have a hidden system file in that directory or in a sub-directory. Try this command from a command prompt: CD X:\Windows ATTRIB -R -A -S -H *.* /S /D CD .. RD Windows Where X: is the drive letter for the SSD drive.


2

First, I'd recommend you go through a tutorial for the Linux shell, if you're not familiar with it. There's some basic things you need to know about how files are organized and how permissions work. If you run ls, your shell will show you all files and directories in the current working directory. To get to your downloads directory, you have to type: cd ...


0

Your first problem is that you are at your home folder, or ~. Then, you are cding into /Downloads, which is on the root. The solution is cd Downloads or cd ~/Downloads Your second problem is that you are trying to execute a compressed file. You want to decompress it, with xz yakuake-2.9.9.tar.xz You may need to install xz first. If you need help ...


0

With workgroups you are requesting information from the computer that is handling the "browser" function. This doesn't update in real time and so can be a very hit and miss. If you are using the same username and password locally as the computer you are administrating you should be ok as the request is handled without the browser.


0

You receive access denied because TrustedInstaller is the owner of the file and this is a protected operating system file. The steps needed involve taking ownership of the file, as detailed in this question: how do i get administrative permission from trusted installer to delete a file in windows media player? Before taking ownership I would suggest you ...


2

No. You can do this, but you need to edit all subfolders on the root first, edit their permissions, go to advanced, and uncheck inherit rights from parent. In the next dialog select Copy, to copy the rights. If you don't do the above, you not only change the rights on the root folder, but all subsequent folders too. Folders created by windows will already ...


0

One thing immediately speed up the process by not using -exec in the find but by piping the resulting names to xargs: find . -type d -print0 | xargs -0 chmod 777 The above is only an example, -print0 correctly passes those nasty files with weird filenames and the -0 parameters on the xargs command reads this output correctly. Anyway the above command ...


1

Both chown and chmod offer a -R option that makes the recursive. These two commands do nearly all of what you want and are quite fast: chmod -R u=rwX,go=rX * chown -R nobody:nogroup * The mode u=rwX sets the user mode to read and write and, on the condition that the file/directory already has execute permission for someone, eXecute. Thus, this keeps ...


-1

You wrote... I am trying to access a directory on my Filezilla FTP server using the ftp command in Windows from a local computer on the network, and then put a list of all those files in the directory in a text file... and: All firewall settings have been opened for Filezilla, FTP connections, passive FTP connections, and for all file transfers. I am ...


0

I managed to get the icacls and Takeown to work in elevated command prompt and this helped me to take ownership and gain full control rights to the File. what I wasn't aware of was that there were two different Config.nt files one in the root of System32 and another in one of the folders in WinSxS. I happened to give myself control to the wrong config file. ...


0

You must have administrative permissions on both computers to complete this task. On machine A: Make sure you have full access to all of the files on your portable hard drive, taking ownership, etc. as necessary In Computer, right-click the drive icon for your portable hard drive, click Properties, then on the Security tab click Edit In the Permissions ...


0

This does the trick if you have sudo and it can save you from entering your password one more time in some cases: sudo su $USER


2

UAC prevents users with administrator privileges to change system files when you open them through Explorer. I am not sure about Windows 8, but in Windows 7 you could start Notepad with the 'Run as administrator' option, open the file from notepad, edit and save it.


1

The simple, stupid answer: You can shorten your sequence of commands a little by combining the first n–1 of them: setfacl -m u:colleague:x /rather /rather/long /rather/long/path /rather/long/path/to /rather/long/path/to/the setfacl -m u:colleague:xr /rather/long/path/to/the/directory An “obvious” warning: Even if you own the target (leaf) directory, ...


0

I had a similar problem, 'til I 'named' the volume (SD card). Now I can delete folders and/or files.


1

These steps assume that all the files are in the same place as my computer in Mac OS X. cd /private/etc/apache2/ nano httpd.conf Modify the file. Follow the video steps: https://www.youtube.com/watch?v=YgVJnqQ_Xb8 (I don't have time to put the video steps. I put it later). Restart the server sudo apachectl restart Go to ./ngrok 80 Copy ...


0

Did you check the permissions for Program Files? Sometimes you can't set full control inheritable from root level, so go to the problem directory and make sure full control is set there - - and make sure the permissions are inherited.


2

Put home directories on a noexec file system. That will help prevent the user from executing binaries stored there, although it isn't a 100% guarantee. Put any other user-writable locations such as /tmp also on noexec file systems. Put anything you want users to be able to execute into for example /usr/local, owned by root and with appropriate permissions. ...


0

If you're going to share an writable, external disk with other OS X systems, you can run the following command from YOUR machine to prevent .DS_Store files from appearing touch /Volumes/your_volume_name/.metadata_never_index then protect the file by running chmod 444 /Volumes/your_volume_name/.metadata_never_index This existence of this hidden ...


0

Alright, so I found an answer after changing my keywords. See also: How to prevent sudo users from running specific commands? Step 1: sudo visudo The syntax is like this: user host=command This grants sudo access to a given command. You can also do groups like %group host=command You can use ALL in any of the 3 'columns' to apply this to any ...


0

In my case I was trying to delete a folder from a network share which was write-protected. Because the PCs had similar names I didn't realize that I was working on the remote folder instead of the local folder. Solution: simply delete the correct (local) folder.


0

probably using sudo pkill -UPDATE_LOG <process-name> instead of kill will be enough restrictive to meet your need? Another way to adress this is to embed the command you want to offer with sudo in a custom script or exec to do this action.


1

You will have to add your user to the sudoers group. There is only one root. (And it is named root.)


0

Well, even though being asked for formatting your disk looks critical and terminal... all I had to do was right click it again, go to properties, set the permissions to Everyone again, and that's it... all my data is back.


2

You do not need to assign ownership to make sure everyone can access and use the files. In the security tab, give both users (or the everyone user for that matter) full control rights and your problem will be solved. Even if one of the two users is owner, those with rights can still work with it, which is your ultimate goal. Windows gives the person who ...


2

The solution, as the Server Fault post describes, is to mount your EBS to another (new) instance which you can connect to. The EBS will be just a drive there, and you will be able to remote connect to the instance since it is new. You can then sudo chown the directories you broke in the first place. Stop (NOT terminate) your first instance from AWS console ...


0

Maybe you tried this, but just making it explicit: In windows explorer, go to your program files directory Right-click on the anti-virus folder and select "properties" Go to the Security tab click the "Edit" button Click "Users" in the top list click "full control" in the lower list click OK Can you then replace the file? If no, then maybe try clicking ...


0

To make the file accesible for other users you need to update the integrity level of the file. This can be done by using icacls.exe in the system32 folder but this reg file will add a context menu which allows setting the level: Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\setintegritylevel] ...


0

the file should be 600, the directory 700. chmod go-w ~ chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys That the permissions formula I always use. I'm running debian, but should work the same for ubuntu


0

If you deleted everything anyway, can't you just run rm -R Dropbox? This will remove everything recursively, including files/directories starting with .. As for FTP users seeing those files, I think it really depends on the actual FTP server being used (and possibly the client as well).


0

Alternatively, you can set up FACLS for these directories. It would be the cleanest, best, and preferred method if you need more complicated access control lists. use man pages for: man getfacl man setfacl usage is going to be something like this: setfacl -m d:g:"groupname":rwx /path/to/desired/directory setfacl -m g:"groupname":rwx ...


1

First, have each employee belong to the department group, i.e. acc1 belongs to Account and ps3 belongs to Presales. Then, on department level, have each subdirectory under Department have its group ID equal to the respective department group, with group level read+execute access and revoke all access from others, so it looks like this when you do ls -la ...


0

Using find more simply like this: find <from_where_to_change> -not -path "*/<excluded_dir_name>*" [-and -not -path "*/<another_excluded_dir_if_you_want>*"] -exec chown <user>[:<group>] {} \; In my case it was: find /data/project -not -path "*/.svn*" -exec chown :www-data {} \; This way I changed group on folder ...



Top 50 recent answers are included