Sponsored Content
Operating Systems Linux Ubuntu Create zip file from root owned fstab Post 303031452 by Corona688 on Thursday 28th of February 2019 12:33:56 PM
Old 02-28-2019
Use -j to junk the path element, i.e. zip -u -j this.zip /etc/fstab and you need not run it from inside /etc any more.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl CGI to access / edit "root" owned config files

I am trying to write a CGI program which accesses UNIX configuration files and changes them as required. The thing is, I don't want the CGI program to be "root" owned - it's Perl based! Is there any way that the Perl CGI program can request a username and password - and then use this to... (1 Reply)
Discussion started by: WIntellect
1 Replies

2. Linux

How to edit /etc/fstab when root was mounted as read only

can somebody help me out in editing the /etc/fstab. I am on RHEL5 (Tikanga). **The problem is that i have given a wrong LABEL in /etc/fstab for root volume and so after reboot, it is unable to resolve the wrong LABEL; so, i have to edit the /etc/fstab :-( -ilan (3 Replies)
Discussion started by: ilan
3 Replies

3. Linux

How to create zip file without path?

Hello, I have generated a PHP script that creates files needed for EPUB file. I have a temp directory where these files are created into and then needs to be zipped. The directory structure is: mimetype content.opf index.html stylesheet.css toc.ncx META-INF META-INF/container.xml ... (4 Replies)
Discussion started by: spaze
4 Replies

4. UNIX for Dummies Questions & Answers

How to find root owned world writable files?

Being a system administrator i came across a statement as " Excluding temporary directories /tmp and /var/tmp, no root owned files should be in world writable directories" While the above statement may look straight forward but how would i check if there are any such directories in the... (7 Replies)
Discussion started by: pinga123
7 Replies

5. UNIX for Dummies Questions & Answers

user able to delete directory owned by root

I've tried to figure this out. I'm only about 6 mos into my AIX admin duties, but I've got a "security" problem I can't figure out. I've created a sub directory as follows: drwx------ 2 root system 256 Apr 13 16:02 mike I've logged in another session with the following user: $ id... (2 Replies)
Discussion started by: mpheine
2 Replies

6. AIX

AIX 5.x OpenSSH choot and non-root owned

Good day. I was looking at implementing a chroot environment using openssh. I know I can use the sshd_config file and dictate that it is to use chroot for a specific directory for a user/group. However, the issue with this is that it is has to be root owned. To my knowledge, there is no mount... (0 Replies)
Discussion started by: smurphy_it
0 Replies

7. AIX

find command to list all the 777 files and directories owned by root user

Hi I'm logged in to an AIX box now and we need to do an audit on this box. cbssapr01:# pwd / Which command will show all the files and directories owned by root user with permissions as 777 ? (8 Replies)
Discussion started by: newtoaixos
8 Replies

8. Shell Programming and Scripting

create a zip file

Im fairly new to bash but I wanted to know about an idea I had to stream my file process these days. I modify .html, and .xml files and usually will take the files right click, create .zip, add files, rename, and cut the zip out of the folder and paste into another folder. I KNOW bash should be... (13 Replies)
Discussion started by: graphicsman
13 Replies

9. UNIX for Dummies Questions & Answers

Read authorization for everybody on sub-directory owned by root

Hello. On my family laptop, I have a directory named /local. It is owned by root. I want to create a sub-directory named documents ( /local/documents ). I want to exclude exec for every body in that directory I want every authenticated linux user can create a sub directory ( ie :... (7 Replies)
Discussion started by: jcdole
7 Replies

10. Red Hat

Rc.sysinit mounts root FS then why we have entry in fstab

Hello, In linux /etc/rc.d/rc.sysinit mounts root File System as RW during the booting phase. So why we have entry of it in /etc/fstab? Thanks, Nitin (1 Reply)
Discussion started by: Nitin Pradhan
1 Replies
ZIP_OPEN(3)						     Library Functions Manual						       ZIP_OPEN(3)

NAME
zip_open - open zip archive LIBRARY
libzip (-lzip) SYNOPSIS
#include <zip.h> struct zip * zip_open(const char *path, int flags, int *errorp); DESCRIPTION
The zip archive specified by path is opened and a pointer to a struct zip, used to manipulate the archive, is returned. The are specified by or'ing the following values, or 0 for none of them. ZIP_CREATE Create the archive if it does not exist. ZIP_EXCL Error if archive already exists. ZIP_CHECKCONS Perform additional consistency checks on the archive, and error if they fail. If an error occurs and errorp is non-NULL, it will be set to the corresponding error code. RETURN VALUES
Upon successful completion zip_open returns a struct zip pointer. Otherwise, NULL is returned and *errorp is set to indicate the error. ERRORS
The archive specified by path is opened unless: [ZIP_ER_EXISTS] The file specified by path exists and ZIP_EXCL is set. [ZIP_ER_INCONS] Inconsistencies were found in the file specified by path and ZIP_CHECKCONS was specified. [ZIP_ER_INVAL] The path argument is NULL. [ZIP_ER_MEMORY] Required memory could not be allocated. [ZIP_ER_NOENT] The file specified by path does not exist and ZIP_CREATE is not set. [ZIP_ER_NOZIP] The file specified by path is not a zip archive. [ZIP_ER_OPEN] The file specified by path could not be opened. [ZIP_ER_READ] A read error occurred; see for details. [ZIP_ER_SEEK] The file specified by path does not allow seeks. SEE ALSO
libzip(3), zip_close(3), zip_error_to_str(3), zip_fdopen(3) AUTHORS
Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at> NiH February 15, 2009 ZIP_OPEN(3)
All times are GMT -4. The time now is 11:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy