All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
1answer
13k views

cp: cannot create regular file: Permission denied

I am running a PHP script on my Apache server and from the script I need to copy some files (to run a Bash script that copies files). I can copy to a directory /tmp with no problems, but when I want ...
1
vote
1answer
156 views

How to copy a file I have permission to execute, but not permission to copy?

I have a file in a subdirectory of /etc/ which I would like to copy, I can run this file as a regular user, however when I run cp /etc/subdir/desired_file . I am refused permission. However I can ...
1
vote
2answers
358 views

Overwrite file preserving target permissions without shell invocation

I have this situation $ ls -la -rw-r--r-- 1 user user 123 Mar 5 19:32 file-a -rwx---rwx 1 user user 987 Mar 5 19:32 file-b I would like to overwrite file-b with file-a but I would like to ...
0
votes
1answer
1k views

How to copy files and folders from a usb ntfs filesystem to internal ext4 without importing permissions?

I have a USB disk that I use to synchronize data between computers with different operating systems (currently using a nice GUI utility called FreeFileSync), and its format is NTFS (which is ...
2
votes
1answer
8k views

cannot create regular file permission denied

I have a NAS whose ip is 192.168.1.7 There is a share on the NAS named music and in that share is a folder named 'archives'. I want to copy a file from my local hard drive /data/favourites/my-web-...
2
votes
0answers
710 views

Does Linux copy NTFS File Permissions?

I used a second HDD for data storage on my previous Windows installation (SSD). The problem is that when I try to access the files and folders Windows doesn't give me the right to do so. Is there a ...
6
votes
2answers
4k views

Why does cp --no-preserve=mode preserves the mode? Alternative tools available?

$ cp --no-preserve=mode --parents /sys/power/state /tmp/test/ $ cp --no-preserve=mode --parents /sys/bus/cpu/drivers_autoprobe /tmp/test/ The second of the two lines will fail with cp: cannot make ...
0
votes
0answers
131 views

rsync file permissions are changing after syncing

It looks like rsync while copying file from source to destination is changing file permissions to different i have tried all options -o,-p,-avz --no-perms --no-owner --no-group,.. no luck still rsync ...
1
vote
1answer
94 views

How to copy file from one use to another?

I have a web server and it using by few developers. Web-site is under website user. Other users are like user1, user2 etc. I have given sudo access to user1, user2.. to access website. The issue I'm ...
11
votes
3answers
2k views

How to copy a directory which root can't access to a directory that only root can access?

I have a directory on an nfs mount, which on the server is at /home/myname/.rubies Root cannot access this directory: [mitchell.usher@server ~]$ stat /home/mitchell.usher/.rubies File: `/home/...
9
votes
3answers
2k views

Watch /tmp for file creation and prevent deletion of files? [duplicate]

I have a binary that creates some files in /tmp/*some folder* and runs them. This same binary deletes these files right after running them. Is there any way to intercept these files? I can't make the ...
1
vote
2answers
2k views

How to copy directory structure from one server to another without root user?

I would like to know best way to copy directory structure from one server(Unix) to another (Linux): without root user servers are not connected (e.g. can't use SSH directly between them) I need to ...
0
votes
2answers
3k views

How do I archive a folder keeping owners and permissions intact?

Is there any way to archive a folder and keep the owners and permissions intact? I'm doing a backup of some files, which I want to move using a usb-stick, which has a FAT filesystem. So the idea was ...
1
vote
0answers
625 views

Is it possible to change file permissions when copying

I have a directory with default ACL permissions that get copied to all files created in that directory, but only if they are created in that directory. Would it be possible to change the permissions ...
1
vote
0answers
137 views

Copying files to a directory shared via ACL doesn't get default mask

I'm trying to setup a simple shared directory on an ext4 filesystem for a group of users to work on. Let's say I just need to give all permissions to all users belonging to the group "workgroup" to ...
8
votes
1answer
25k views

File inheriting permission of directory it is copied in?

I have files created into my home directory with only user read permission (r-- --- ---). I want to copy this file to another directory /etc/test/ which has the folder permission of 744 (rwx r-- r--). ...
5
votes
2answers
4k views

SELinux: Can I disable copying of certain files?

Please excuse me if this is too basic and you're tempted to throw an RTFM at me. I want to prevent users from copying certain files while granting them read access to the same files. I thought this ...
2
votes
5answers
9k views

How do I disable copy permissions?

Can we set permissions, on a Linux box OR for a particular directory (Scientific Linux in my case) that, one can read files but cannot copy, move or delete them? Update: My Scenario is, We developed ...
3
votes
3answers
6k views

read only access to all files in a specific sub-folder

I have got a specific folder located in "/home/.../reboot/". I have a series of users that require read-only access to the ever changing files within. My problem is that the same users are not ...
1
vote
2answers
53 views

Translating user id when creating image

I want to create an image (for example ext3 image) from a given directory hierarchy. This directory hierarchy is owned by a given user. But on the final image, I want the files to be owned by ...
3
votes
2answers
22k views

Permissions “problem” using SCP to copy to root owned folder from local

I'm taking some early forays into setting up a basic LAMP box. It's my first time setting up the software I'll use as opposed to just being handed a working environment, so go easy on me :) I have ...